浏览代码

Merge pull request #297 from ente-io/gallery_load_screen

Add text to indicate that we are loading photos from device
Vishnu Mohandas 3 年之前
父节点
当前提交
d5baf975e7
共有 2 个文件被更改,包括 31 次插入17 次删除
  1. 4 0
      lib/ente_theme_data.dart
  2. 27 17
      lib/ui/loading_photos_widget.dart

+ 4 - 0
lib/ente_theme_data.dart

@@ -117,6 +117,10 @@ extension CustomColorScheme on ColorScheme {
   Color get toastBackgroundColor => brightness == Brightness.light
   Color get toastBackgroundColor => brightness == Brightness.light
       ? Color.fromRGBO(24, 24, 24, 0.95)
       ? Color.fromRGBO(24, 24, 24, 0.95)
       : Color.fromRGBO(255, 255, 255, 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(
 OutlinedButtonThemeData buildOutlinedButtonThemeData(

+ 27 - 17
lib/ui/loading_photos_widget.dart

@@ -89,23 +89,33 @@ class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
             crossAxisAlignment: CrossAxisAlignment.center,
             crossAxisAlignment: CrossAxisAlignment.center,
             mainAxisAlignment: MainAxisAlignment.spaceEvenly,
             mainAxisAlignment: MainAxisAlignment.spaceEvenly,
             children: [
             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(
               Column(
                 children: [
                 children: [
                   Row(
                   Row(