diff --git a/assets/l10n/intl_en.arb b/assets/l10n/intl_en.arb index a4fb07e109..1fa791c039 100644 --- a/assets/l10n/intl_en.arb +++ b/assets/l10n/intl_en.arb @@ -2690,7 +2690,7 @@ "@noImagesFound": {}, "captionForImagesIsNotSupportYet": "Caption for images is not support yet.", "@captionForImagesIsNotSupportYet": {}, - "tapToAllowAccessToYourGallery": "Tap to allow access to your Gallery", + "tapToAllowAccessToYourGallery": "Tap to allow gallery access", "@tapToAllowAccessToYourGallery": {}, "tapToAllowAccessToYourCamera": "You can enable camera access in the Settings app to make video calls in", "@tapToAllowAccessToYourCamera": {}, diff --git a/lib/presentation/mixins/media_picker_mixin.dart b/lib/presentation/mixins/media_picker_mixin.dart index 98aa362e15..4877314899 100644 --- a/lib/presentation/mixins/media_picker_mixin.dart +++ b/lib/presentation/mixins/media_picker_mixin.dart @@ -289,18 +289,20 @@ mixin MediaPickerMixin on CommonMediaPickerMixin { ), ), goToSettingsWidget: Column( + mainAxisAlignment: MainAxisAlignment.center, children: [ SvgPicture.asset( ImagePaths.icPhotosSettingPermission, - width: 40, - height: 40, + width: MediaPickerStyle.photoPermissionIconSize, + height: MediaPickerStyle.photoPermissionIconSize, ), Text( L10n.of(context)!.tapToAllowAccessToYourGallery, - style: Theme.of(context) - .textTheme - .titleSmall - ?.copyWith(color: LinagoraRefColors.material().neutral), + style: Theme.of(context).textTheme.titleSmall?.copyWith( + color: LinagoraRefColors.material().neutral, + fontWeight: MediaPickerStyle.photoPermissionFontWeight, + fontSize: MediaPickerStyle.photoPermissionFontSize, + ), textAlign: TextAlign.center, ), ], diff --git a/lib/presentation/mixins/single_image_picker_mixin.dart b/lib/presentation/mixins/single_image_picker_mixin.dart index fc63f04bf3..f4a08282db 100644 --- a/lib/presentation/mixins/single_image_picker_mixin.dart +++ b/lib/presentation/mixins/single_image_picker_mixin.dart @@ -1,3 +1,4 @@ +import 'package:fluffychat/presentation/style/media_picker_style.dart'; import 'package:fluffychat/resource/image_paths.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; @@ -31,24 +32,27 @@ mixin SingleImagePickerMixin on CommonMediaPickerMixin { context: context, controller: imagePickerController, backgroundImageCamera: const AssetImage("assets/verification.png"), - initialChildSize: 0.6, + initialChildSize: MediaPickerStyle.initialChildSize, permissionStatus: permissionStatusPhotos, assetBackgroundColor: LinagoraSysColors.material().background, - expandedWidget: const SizedBox(height: 50), + expandedWidget: + const SizedBox(height: MediaPickerStyle.expandedWidgetHeight), counterImageBuilder: (_) => const SizedBox.shrink(), goToSettingsWidget: Column( + mainAxisAlignment: MainAxisAlignment.center, children: [ SvgPicture.asset( ImagePaths.icPhotosSettingPermission, - width: 40, - height: 40, + width: MediaPickerStyle.photoPermissionIconSize, + height: MediaPickerStyle.photoPermissionIconSize, ), Text( L10n.of(context)!.tapToAllowAccessToYourGallery, - style: Theme.of(context) - .textTheme - .titleSmall - ?.copyWith(color: LinagoraRefColors.material().neutral), + style: Theme.of(context).textTheme.titleSmall?.copyWith( + color: LinagoraRefColors.material().neutral, + fontWeight: MediaPickerStyle.photoPermissionFontWeight, + fontSize: MediaPickerStyle.photoPermissionFontSize, + ), textAlign: TextAlign.center, ), ], diff --git a/lib/presentation/style/media_picker_style.dart b/lib/presentation/style/media_picker_style.dart index e293c3ba8a..c8d31a491f 100644 --- a/lib/presentation/style/media_picker_style.dart +++ b/lib/presentation/style/media_picker_style.dart @@ -42,4 +42,12 @@ class MediaPickerStyle { static const double borderSideWidth = 1.5; static const double minFontSize = 8; + + static double photoPermissionIconSize = 48.0; + + static double photoPermissionFontSize = 16; + + static FontWeight photoPermissionFontWeight = FontWeight.w600; + + static const double expandedWidgetHeight = 50; } diff --git a/pubspec.lock b/pubspec.lock index de37efe359..90aff93ea5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1614,7 +1614,7 @@ packages: description: path: "." ref: master - resolved-ref: b87f765e777d8d8a3995a8c912d4becd414ba223 + resolved-ref: ffbcb9dd4d6cefb7fb60b7a9b15ad684dae6bdff url: "git@github.com:linagora/linagora-design-flutter.git" source: git version: "0.0.1"