From 08a89ace39ebd17c820549428243bc7c0c00a5cd Mon Sep 17 00:00:00 2001 From: vishnukvmd Date: Sat, 11 Jun 2022 11:56:34 +0530 Subject: [PATCH] Add text to indicate that we are loading photos from device --- lib/ente_theme_data.dart | 4 +++ lib/ui/loading_photos_widget.dart | 44 +++++++++++++++++++------------ 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/lib/ente_theme_data.dart b/lib/ente_theme_data.dart index dff7624ad..4d569ad32 100644 --- a/lib/ente_theme_data.dart +++ b/lib/ente_theme_data.dart @@ -117,6 +117,10 @@ extension CustomColorScheme on ColorScheme { Color get toastBackgroundColor => brightness == Brightness.light ? Color.fromRGBO(24, 24, 24, 0.95) : Color.fromRGBO(255, 255, 255, 0.95); + + Color get subTextColor => brightness == Brightness.light + ? Color.fromRGBO(180, 180, 180, 1) + : Color.fromRGBO(100, 100, 100, 1); } OutlinedButtonThemeData buildOutlinedButtonThemeData( diff --git a/lib/ui/loading_photos_widget.dart b/lib/ui/loading_photos_widget.dart index 367a634bd..9217340a0 100644 --- a/lib/ui/loading_photos_widget.dart +++ b/lib/ui/loading_photos_widget.dart @@ -89,23 +89,33 @@ class _LoadingPhotosWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Stack(alignment: Alignment.center, children: [ - isLightMode - ? Image.asset( - 'assets/loading_photos_light.png', - color: Colors.white.withOpacity(0.5), - colorBlendMode: BlendMode.modulate, - ) - : Image.asset( - 'assets/loading_photos_light.png', - color: Colors.white.withOpacity(0.25), - colorBlendMode: BlendMode.modulate, - ), - Lottie.asset( - 'assets/loadingGalleryLottie.json', - height: 400, - ) - ]), + Stack( + alignment: Alignment.center, + children: [ + isLightMode + ? Image.asset( + 'assets/loading_photos_light.png', + color: Colors.white.withOpacity(0.5), + colorBlendMode: BlendMode.modulate, + ) + : Image.asset( + 'assets/loading_photos_light.png', + color: Colors.white.withOpacity(0.25), + colorBlendMode: BlendMode.modulate, + ), + Lottie.asset( + 'assets/loadingGalleryLottie.json', + height: 400, + ) + ], + ), + Text( + "Loading your photos...", + style: TextStyle( + color: Theme.of(context).colorScheme.subTextColor, + ), + ), + Padding(padding: EdgeInsets.all(36)), Column( children: [ Row(