Ver Fonte

[fit]修改照片分析结果背景有间距的问题

云天逵 há 9 meses atrás
pai
commit
e604e2f232

+ 1 - 1
lib/module/image_picker/image_picker_util.dart

@@ -386,7 +386,7 @@ class ImagePickerUtil {
   // 加载图片资源
   static Future<List<AssetEntity>> loadAssets({bool sortByDate = true}) async {
     final PermissionState result = await PhotoManager.requestPermissionExtend();
-    if (!result.isAuth) return [];
+    if (!result.hasAccess) return [];
 
     if (androidPhotos.isNotEmpty) return androidPhotos;
     // 选择相册

+ 183 - 180
lib/module/photo_info/photo_info_view.dart

@@ -70,7 +70,6 @@ class PhotoInfoPage extends BasePage<PhotoInfoController> {
               Visibility(
                 visible: controller.type.value == FileType.analysis,
                 child: Positioned(
-
                   left: 0,
                   right: 0,
                   bottom: 0,
@@ -78,205 +77,209 @@ class PhotoInfoPage extends BasePage<PhotoInfoController> {
                     crossAxisAlignment: CrossAxisAlignment.start,
                     children: [
                       Container(
-                        width:double.infinity,
+                        width: double.infinity,
                         decoration: BoxDecoration(
-                          image: DecorationImage(image:
-                              Assets.images.bgPhotoAnalyze.provider(),fit: BoxFit.fill),
+                          image: DecorationImage(
+                              image: Assets.images.bgPhotoAnalyze.provider(),
+                              fit: BoxFit.fill),
                           borderRadius: BorderRadius.circular(12.r),
                         ),
-                        margin: EdgeInsets.only(left: 18.w),
                         child: Obx(() {
                           return SingleChildScrollView(
-                              child: Column(
-                            crossAxisAlignment: CrossAxisAlignment.start,
-                            children: [
-                              Text(
-                                "Analysis Results",
-                                style: TextStyle(
-                                  shadows: [
-                                    Shadow(
-                                      color: Colors.black,
-                                      blurRadius: 5.r,
-                                    ),
-                                  ],
-                                  color: Colors.white,
-                                  fontWeight: FontWeight.w900,
-                                  fontSize: 16.sp,
+                              child: Container(
+                            margin: EdgeInsets.only(left: 18.w),
+                            child: Column(
+                              crossAxisAlignment: CrossAxisAlignment.start,
+                              children: [
+                                Text(
+                                  "Analysis Results",
+                                  style: TextStyle(
+                                    shadows: [
+                                      Shadow(
+                                        color: Colors.black,
+                                        blurRadius: 5.r,
+                                      ),
+                                    ],
+                                    color: Colors.white,
+                                    fontWeight: FontWeight.w900,
+                                    fontSize: 16.sp,
+                                  ),
                                 ),
-                              ),
-                              Visibility(
-                                visible: controller.createTime.value.isNotEmpty,
-                                child: Column(
-                                  children: [
-                                    SizedBox(
-                                      height: 20.h,
-                                    ),
-                                    Text(
-                                      controller.createTime.value,
-                                      style: TextStyle(
-                                        shadows: [
-                                          Shadow(
-                                            color: Colors.black,
-                                            blurRadius: 5.r,
-                                          ),
-                                        ],
-                                        color: Colors.white,
-                                        fontWeight: FontWeight.w500,
-                                        fontSize: 13.sp,
+                                Visibility(
+                                  visible:
+                                      controller.createTime.value.isNotEmpty,
+                                  child: Column(
+                                    children: [
+                                      SizedBox(
+                                        height: 20.h,
                                       ),
-                                    ),
-                                  ],
+                                      Text(
+                                        controller.createTime.value,
+                                        style: TextStyle(
+                                          shadows: [
+                                            Shadow(
+                                              color: Colors.black,
+                                              blurRadius: 5.r,
+                                            ),
+                                          ],
+                                          color: Colors.white,
+                                          fontWeight: FontWeight.w500,
+                                          fontSize: 13.sp,
+                                        ),
+                                      ),
+                                    ],
+                                  ),
                                 ),
-                              ),
-                              Visibility(
-                                visible: controller.fileName.value.isNotEmpty,
-                                child: Column(
-                                  children: [
-                                    SizedBox(
-                                      height: 12.h,
-                                    ),
-                                    Text(
-                                      controller.fileName.value,
-                                      style: TextStyle(
-                                        shadows: [
-                                          Shadow(
-                                            color: Colors.black,
-                                            blurRadius: 5.r,
-                                          ),
-                                        ],
-                                        color: Colors.white,
-                                        fontWeight: FontWeight.w500,
-                                        fontSize: 13.sp,
+                                Visibility(
+                                  visible: controller.fileName.value.isNotEmpty,
+                                  child: Column(
+                                    children: [
+                                      SizedBox(
+                                        height: 12.h,
                                       ),
-                                    ),
-                                  ],
+                                      Text(
+                                        controller.fileName.value,
+                                        style: TextStyle(
+                                          shadows: [
+                                            Shadow(
+                                              color: Colors.black,
+                                              blurRadius: 5.r,
+                                            ),
+                                          ],
+                                          color: Colors.white,
+                                          fontWeight: FontWeight.w500,
+                                          fontSize: 13.sp,
+                                        ),
+                                      ),
+                                    ],
+                                  ),
                                 ),
-                              ),
-                              Visibility(
-                                visible: controller.model.value.isNotEmpty,
-                                child: Column(
-                                  children: [
-                                    SizedBox(
-                                      height: 12.h,
-                                    ),
-                                    Text(
-                                      controller.model.value,
-                                      style: TextStyle(
-                                        shadows: [
-                                          Shadow(
-                                            color: Colors.black,
-                                            blurRadius: 5.r,
-                                          ),
-                                        ],
-                                        color: Colors.white,
-                                        fontWeight: FontWeight.w500,
-                                        fontSize: 13.sp,
+                                Visibility(
+                                  visible: controller.model.value.isNotEmpty,
+                                  child: Column(
+                                    children: [
+                                      SizedBox(
+                                        height: 12.h,
                                       ),
-                                    ),
-                                  ],
+                                      Text(
+                                        controller.model.value,
+                                        style: TextStyle(
+                                          shadows: [
+                                            Shadow(
+                                              color: Colors.black,
+                                              blurRadius: 5.r,
+                                            ),
+                                          ],
+                                          color: Colors.white,
+                                          fontWeight: FontWeight.w500,
+                                          fontSize: 13.sp,
+                                        ),
+                                      ),
+                                    ],
+                                  ),
                                 ),
-                              ),
-                              Visibility(
-                                visible:
-                                    controller.focalLength.value.isNotEmpty,
-                                child: Column(
-                                  children: [
-                                    SizedBox(
-                                      height: 12.h,
-                                    ),
-                                    Text(
-                                      controller.focalLength.value,
-                                      style: TextStyle(
-                                        shadows: [
-                                          Shadow(
-                                            color: Colors.black,
-                                            blurRadius: 5.r,
-                                          ),
-                                        ],
-                                        color: Colors.white,
-                                        fontWeight: FontWeight.w500,
-                                        fontSize: 13.sp,
+                                Visibility(
+                                  visible:
+                                      controller.focalLength.value.isNotEmpty,
+                                  child: Column(
+                                    children: [
+                                      SizedBox(
+                                        height: 12.h,
                                       ),
-                                    ),
-                                  ],
+                                      Text(
+                                        controller.focalLength.value,
+                                        style: TextStyle(
+                                          shadows: [
+                                            Shadow(
+                                              color: Colors.black,
+                                              blurRadius: 5.r,
+                                            ),
+                                          ],
+                                          color: Colors.white,
+                                          fontWeight: FontWeight.w500,
+                                          fontSize: 13.sp,
+                                        ),
+                                      ),
+                                    ],
+                                  ),
                                 ),
-                              ),
-                              Visibility(
-                                visible: controller.size.value.isNotEmpty,
-                                child: Column(
-                                  children: [
-                                    SizedBox(
-                                      height: 12.h,
-                                    ),
-                                    Text(
-                                      controller.size.value,
-                                      style: TextStyle(
-                                        shadows: [
-                                          Shadow(
-                                            color: Colors.black,
-                                            blurRadius: 5.r,
-                                          ),
-                                        ],
-                                        color: Colors.white,
-                                        fontWeight: FontWeight.w500,
-                                        fontSize: 13.sp,
+                                Visibility(
+                                  visible: controller.size.value.isNotEmpty,
+                                  child: Column(
+                                    children: [
+                                      SizedBox(
+                                        height: 12.h,
                                       ),
-                                    ),
-                                  ],
+                                      Text(
+                                        controller.size.value,
+                                        style: TextStyle(
+                                          shadows: [
+                                            Shadow(
+                                              color: Colors.black,
+                                              blurRadius: 5.r,
+                                            ),
+                                          ],
+                                          color: Colors.white,
+                                          fontWeight: FontWeight.w500,
+                                          fontSize: 13.sp,
+                                        ),
+                                      ),
+                                    ],
+                                  ),
                                 ),
-                              ),
-                              Visibility(
-                                visible: controller.iso.value.isNotEmpty,
-                                child: Column(
-                                  children: [
-                                    SizedBox(
-                                      height: 12.h,
-                                    ),
-                                    Text(
-                                      controller.iso.value,
-                                      style: TextStyle(
-                                        shadows: [
-                                          Shadow(
-                                            color: Colors.black,
-                                            blurRadius: 5.r,
-                                          ),
-                                        ],
-                                        color: Colors.white,
-                                        fontWeight: FontWeight.w500,
-                                        fontSize: 13.sp,
+                                Visibility(
+                                  visible: controller.iso.value.isNotEmpty,
+                                  child: Column(
+                                    children: [
+                                      SizedBox(
+                                        height: 12.h,
                                       ),
-                                    ),
-                                  ],
+                                      Text(
+                                        controller.iso.value,
+                                        style: TextStyle(
+                                          shadows: [
+                                            Shadow(
+                                              color: Colors.black,
+                                              blurRadius: 5.r,
+                                            ),
+                                          ],
+                                          color: Colors.white,
+                                          fontWeight: FontWeight.w500,
+                                          fontSize: 13.sp,
+                                        ),
+                                      ),
+                                    ],
+                                  ),
                                 ),
-                              ),
-                              Visibility(
-                                visible: controller.address.value.isNotEmpty,
-                                child: Column(
-                                  children: [
-                                    SizedBox(
-                                      height: 12.h,
-                                    ),
-                                    Text(
-                                      controller.address.value,
-                                      style: TextStyle(
-                                        shadows: [
-                                          Shadow(
-                                            color: Colors.black,
-                                            blurRadius: 5.r,
-                                          ),
-                                        ],
-                                        color: Colors.white,
-                                        fontWeight: FontWeight.w500,
-                                        fontSize: 13.sp,
+                                Visibility(
+                                  visible: controller.address.value.isNotEmpty,
+                                  child: Column(
+                                    children: [
+                                      SizedBox(
+                                        height: 12.h,
                                       ),
-                                    ),
-                                  ],
+                                      Text(
+                                        controller.address.value,
+                                        style: TextStyle(
+                                          shadows: [
+                                            Shadow(
+                                              color: Colors.black,
+                                              blurRadius: 5.r,
+                                            ),
+                                          ],
+                                          color: Colors.white,
+                                          fontWeight: FontWeight.w500,
+                                          fontSize: 13.sp,
+                                        ),
+                                      ),
+                                    ],
+                                  ),
                                 ),
-                              ),
-                              SizedBox(
-                                height: 32.h,
-                              ),
-                            ],
+                                SizedBox(
+                                  height: 32.h,
+                                ),
+                              ],
+                            ),
                           ));
                         }),
                       ),