Просмотр исходного кода

add select all files in a day icon in UI

ashilkn 2 лет назад
Родитель
Сommit
82cc2dd12e
2 измененных файлов с 24 добавлено и 12 удалено
  1. 24 11
      lib/ui/huge_listview/lazy_loading_gallery.dart
  2. 0 1
      lib/utils/date_time_util.dart

+ 24 - 11
lib/ui/huge_listview/lazy_loading_gallery.dart

@@ -11,6 +11,7 @@ import 'package:photos/core/constants.dart';
 import 'package:photos/events/files_updated_event.dart';
 import 'package:photos/models/file.dart';
 import 'package:photos/models/selected_files.dart';
+import 'package:photos/theme/ente_theme.dart';
 import 'package:photos/ui/huge_listview/place_holder_widget.dart';
 import 'package:photos/ui/viewer/file/detail_page.dart';
 import 'package:photos/ui/viewer/file/thumbnail_widget.dart';
@@ -149,18 +150,30 @@ class _LazyLoadingGalleryState extends State<LazyLoadingGallery> {
     if (_files.isEmpty) {
       return const SizedBox.shrink();
     }
-    return Padding(
-      padding: const EdgeInsets.only(bottom: 12),
-      child: Column(
-        children: [
-          getDayWidget(
-            context,
-            _files[0].creationTime,
-            widget.smallerTodayFont,
+    return Column(
+      children: [
+        Padding(
+          padding: const EdgeInsets.fromLTRB(4, 14, 12, 8),
+          child: Row(
+            mainAxisAlignment: MainAxisAlignment.spaceBetween,
+            children: [
+              getDayWidget(
+                context,
+                _files[0].creationTime,
+                widget.smallerTodayFont,
+              ),
+              GestureDetector(
+                child: Icon(
+                  Icons.check_circle_outlined,
+                  color: getEnteColorScheme(context).strokeMuted,
+                  size: 18,
+                ),
+              )
+            ],
           ),
-          _shouldRender ? _getGallery() : PlaceHolderWidget(_files.length),
-        ],
-      ),
+        ),
+        _shouldRender ? _getGallery() : PlaceHolderWidget(_files.length),
+      ],
     );
   }
 

+ 0 - 1
lib/utils/date_time_util.dart

@@ -196,7 +196,6 @@ Widget getDayWidget(
   bool smallerTodayFont,
 ) {
   return Container(
-    padding: const EdgeInsets.fromLTRB(4, 14, 0, 8),
     alignment: Alignment.centerLeft,
     child: Text(
       getDayTitle(timestamp),