瀏覽代碼

修改背景没铺满的问题

云天逵 1 年之前
父節點
當前提交
406a80269d

+ 1 - 1
lib/dialog/photo_delete_finish_dialog.dart

@@ -103,7 +103,7 @@ void photoDeleteFinishDialog( { Function? onDismiss}) {
               IgnorePointer(
                 child: Assets.images.bgPhotoSelectedPreviewFinish.image(
                   width: 360.w,
-                  height: 335.h,
+
                 ),
               ),
             ],

+ 1 - 1
lib/dialog/photo_deleting_dialog.dart

@@ -49,7 +49,7 @@ void photoDeletingDialog() {
               IgnorePointer(
                 child: Assets.images.bgHome.image(
                   width: 360.w,
-                  height: 234.h,
+
                 ),
               ),
             ],

+ 1 - 1
lib/dialog/wallpaper_detail_dialog.dart

@@ -91,7 +91,7 @@ void wallpaperDetailDialog(
                   IgnorePointer(
                     child: Assets.images.bgHome.image(
                       width: 360.w,
-                      height: 234.h,
+
                     ),
                   ),
                 ],

+ 1 - 1
lib/module/home/home_view.dart

@@ -49,7 +49,7 @@ class HomePage extends BaseView<HomeController> {
         IgnorePointer(
           child: Assets.images.bgHome.image(
             width: 360.w,
-            height: 234.h,
+
           ),
         ),
       ],

+ 1 - 1
lib/module/locations_photo/locations_photo_view.dart

@@ -37,7 +37,7 @@ class LocationsPhotoPage extends BasePage<LocationsPhotoController> {
       IgnorePointer(
         child: Assets.images.bgHome.image(
           width: 360.w,
-          height: 234.h,
+
         ),
       ),
     ]);

+ 1 - 1
lib/module/locations_photo/locations_single_photo_view.dart

@@ -85,7 +85,7 @@ class LocationsSinglePhotoPage
       IgnorePointer(
         child: Assets.images.bgHome.image(
           width: 360.w,
-          height: 234.h,
+
         ),
       ),
     ]);

+ 1 - 1
lib/module/people_photo/people_photo_view.dart

@@ -81,7 +81,7 @@ class PeoplePhotoPage extends BasePage<PeoplePhotoController> {
       IgnorePointer(
         child: Assets.images.bgHome.image(
           width: 360.w,
-          height: 234.h,
+
         ),
       ),
     ]);

+ 2 - 2
lib/module/photo_preview/photo_preview_view.dart

@@ -108,14 +108,14 @@ class PhotoPreviewPage extends BasePage<PhotoPreviewController> {
           return IgnorePointer(
             child: Assets.images.bgPhotoSelectedPreviewFinish.image(
               width: 360.w,
-              height: 335.h,
+
             ),
           );
         } else {
           return IgnorePointer(
             child: Assets.images.bgHome.image(
               width: 360.w,
-              height: 234.h,
+
             ),
           );
         }

+ 2 - 2
lib/module/photo_preview/phtoto_selected_preview_view.dart

@@ -94,14 +94,14 @@ class PhotoSelectedPreviewPage
           return IgnorePointer(
             child: Assets.images.bgPhotoSelectedPreviewFinish.image(
               width: 360.w,
-              height: 335.h,
+
             ),
           );
         } else {
           return IgnorePointer(
             child: Assets.images.bgHome.image(
               width: 360.w,
-              height: 234.h,
+
             ),
           );
         }

+ 92 - 99
lib/module/screenshots_blurry/screenshots_view.dart

@@ -29,68 +29,64 @@ class ScreenshotsPage extends BasePage<ScreenShotsController> {
   @override
   Widget buildBody(BuildContext context) {
     return Stack(children: [
-        PopScope(canPop: false,
+      PopScope(
+        canPop: false,
         onPopInvokedWithResult: (didPop, result) {
           if (didPop) {
             return;
           }
           controller.clickBack();
         },
-        child:
-        Container(
-        child: SafeArea(
-        child: Obx(()
-    {
-      if (controller.photoGroups.isEmpty ||
-          controller.photoGroups[0].images.isEmpty) {
-        return _noNoPicturesCard();
-      }
-      return Column(
-        children: [
-          _titleCard(),
-          Flexible(
+        child: Container(
+          child: SafeArea(
             child: Obx(() {
-              return SizedBox(
-                child: GridView.builder(
-                    padding: EdgeInsets.symmetric(horizontal: 16.w),
-                    scrollDirection: Axis.vertical,
-                    // 设置为垂直方向滚动
-                    physics: BouncingScrollPhysics(),
-                    gridDelegate:
-                    SliverGridDelegateWithFixedCrossAxisCount(
-                      crossAxisCount: 3, // 每行显示 2 个元素
-                      mainAxisSpacing: 8.w, // 垂直间距
-                      crossAxisSpacing: 8.h, // 水平间距
-                    ),
-                    itemCount: controller.photoGroups[0].images.length,
-                    itemBuilder: _buildPhotoItem(
-                        controller.photoGroups[0].images)),
+              if (controller.photoGroups.isEmpty ||
+                  controller.photoGroups[0].images.isEmpty) {
+                return _noNoPicturesCard();
+              }
+              return Column(
+                children: [
+                  _titleCard(),
+                  Flexible(
+                    child: Obx(() {
+                      return SizedBox(
+                        child: GridView.builder(
+                            padding: EdgeInsets.symmetric(horizontal: 16.w),
+                            scrollDirection: Axis.vertical,
+                            // 设置为垂直方向滚动
+                            physics: BouncingScrollPhysics(),
+                            gridDelegate:
+                                SliverGridDelegateWithFixedCrossAxisCount(
+                              crossAxisCount: 3, // 每行显示 2 个元素
+                              mainAxisSpacing: 8.w, // 垂直间距
+                              crossAxisSpacing: 8.h, // 水平间距
+                            ),
+                            itemCount: controller.photoGroups[0].images.length,
+                            itemBuilder: _buildPhotoItem(
+                                controller.photoGroups[0].images)),
+                      );
+                    }),
+                  ),
+                  Obx(() {
+                    if (controller.selectedPhotosIds.isNotEmpty) {
+                      return _bottomBarCard();
+                    } else {
+                      return SizedBox();
+                    }
+                  }),
+                  SizedBox(height: 8.h),
+                ],
               );
             }),
           ),
-          Obx(() {
-            if (controller.selectedPhotosIds.isNotEmpty) {
-              return _bottomBarCard();
-            } else {
-              return SizedBox();
-            }
-          }),
-          SizedBox(height: 8.h),
-        ],
-      );
-    }),
-    ),
-    ),),
-    IgnorePointer(
-    child: Assets.images.bgHome.image(
-    width: 360.w,
-    height: 234.h,
-    )
-    ,
-    )
-    ,
-    ]
-    );
+        ),
+      ),
+      IgnorePointer(
+        child: Assets.images.bgHome.image(
+          width: 360.w,
+        ),
+      ),
+    ]);
   }
 
   Widget _titleCard() {
@@ -113,48 +109,46 @@ class ScreenshotsPage extends BasePage<ScreenShotsController> {
                 ),
                 // 如果photoGroup数据为空,不显示全选按钮
                 controller.photoGroups.isEmpty ||
-                    controller.photoGroups[0].images.isEmpty
+                        controller.photoGroups[0].images.isEmpty
                     ? Container()
                     : GestureDetector(
-                  onTap: () =>
-                      controller.toggleGroupSelection(
-                          controller.photoGroups[0].images),
-                  child: Obx(() =>
-                      Text(
-                        controller
-                            .getGroupByImages(
-                            controller.photoGroups[0].images)
-                            .isSelected
-                            .value
-                            ? 'Deselect All'
-                            : 'Select All',
-                        style: TextStyle(
-                          color: Colors.white.withValues(alpha: 0.7),
-                          fontSize: 14.sp,
-                          fontWeight: FontWeight.w400,
-                        ),
-                      )),
-                ),
+                        onTap: () => controller.toggleGroupSelection(
+                            controller.photoGroups[0].images),
+                        child: Obx(() => Text(
+                              controller
+                                      .getGroupByImages(
+                                          controller.photoGroups[0].images)
+                                      .isSelected
+                                      .value
+                                  ? 'Deselect All'
+                                  : 'Select All',
+                              style: TextStyle(
+                                color: Colors.white.withValues(alpha: 0.7),
+                                fontSize: 14.sp,
+                                fontWeight: FontWeight.w400,
+                              ),
+                            )),
+                      ),
               ],
             );
           }),
           controller.photoGroups.isEmpty ||
-              controller.photoGroups[0].images.isEmpty
+                  controller.photoGroups[0].images.isEmpty
               ? Container()
               : Column(
-            children: [
-              SizedBox(height: 12.h),
-              Text(
-                controller.titleName,
-                style: TextStyle(
-                  color: Colors.white,
-                  fontSize: 24.sp,
-                  fontWeight: FontWeight.w700,
+                  children: [
+                    SizedBox(height: 12.h),
+                    Text(
+                      controller.titleName,
+                      style: TextStyle(
+                        color: Colors.white,
+                        fontSize: 24.sp,
+                        fontWeight: FontWeight.w700,
+                      ),
+                    ),
+                    SizedBox(height: 20.h),
+                  ],
                 ),
-              ),
-              SizedBox(height: 20.h),
-            ],
-          ),
         ],
       ),
     );
@@ -185,8 +179,7 @@ class ScreenshotsPage extends BasePage<ScreenShotsController> {
               SizedBox(width: 5.w),
               Obx(() {
                 return Text(
-                  '${controller.selectedFileCount
-                      .value} files selected (${controller.selectedFilesSizeString})',
+                  '${controller.selectedFileCount.value} files selected (${controller.selectedFilesSizeString})',
                   textAlign: TextAlign.center,
                   style: TextStyle(
                     color: Colors.white,
@@ -201,10 +194,10 @@ class ScreenshotsPage extends BasePage<ScreenShotsController> {
   }
 
   Widget Function(BuildContext, int) _buildPhotoItem(
-      List<AssetEntity> images) =>
-          (context, index) {
+          List<AssetEntity> images) =>
+      (context, index) {
         final group =
-        controller.getGroupByImages(controller.photoGroups[0].images);
+            controller.getGroupByImages(controller.photoGroups[0].images);
 
         return GestureDetector(
           onTap: () =>
@@ -240,16 +233,16 @@ class ScreenshotsPage extends BasePage<ScreenShotsController> {
                       child: Container(
                         child: isSelected
                             ? Center(
-                          child: Assets.images.iconSelected.image(
-                            width: 20.w,
-                            height: 20.h,
-                          ),
-                        )
+                                child: Assets.images.iconSelected.image(
+                                  width: 20.w,
+                                  height: 20.h,
+                                ),
+                              )
                             : Center(
-                            child: Assets.images.iconUnselected.image(
-                              width: 20.w,
-                              height: 20.h,
-                            )),
+                                child: Assets.images.iconUnselected.image(
+                                width: 20.w,
+                                height: 20.h,
+                              )),
                       )),
                 ),
               ],

+ 1 - 1
lib/module/similar_photo/similar_photo_view.dart

@@ -60,7 +60,7 @@ class SimilarPhotoPage extends BasePage<SimilarPhotoController> {
       IgnorePointer(
         child: Assets.images.bgHome.image(
           width: 360.w,
-          height: 234.h,
+
         ),
       ),
     ]);

+ 1 - 1
lib/module/splash/intro/intro_view.dart

@@ -83,7 +83,7 @@ class IntroPage extends BasePage<IntroController> {
       IgnorePointer(
         child: Assets.images.bgPhotoSelectedPreviewFinish.image(
           width: 360.w,
-          height: 335.h,
+
         ),
       ),
     ]);

+ 1 - 1
lib/module/splash/splash_view.dart

@@ -57,7 +57,7 @@ class SplashPage extends BasePage<SplashController> {
       IgnorePointer(
         child: Assets.images.bgPhotoSelectedPreviewFinish.image(
           width: 360.w,
-          height: 335.h,
+
         ),
       ),
     ]);

+ 1 - 1
lib/module/wallpaper/wallpaper_view.dart

@@ -122,7 +122,7 @@ class WallPaperPage extends BasePage<WallPaperController> {
         IgnorePointer(
           child: Assets.images.bgHome.image(
             width: 360.w,
-            height: 234.h,
+
           ),
         )
       ],