|
|
@@ -32,17 +32,17 @@ class HomePage extends BaseView<HomeController> {
|
|
|
SafeArea(
|
|
|
child: SingleChildScrollView(
|
|
|
child: Column(
|
|
|
- children: [
|
|
|
- titleCard(),
|
|
|
- storageCard(),
|
|
|
- similarCard(),
|
|
|
- quickPhotoCard(),
|
|
|
- peopleCard(),
|
|
|
- // locationsCard(),
|
|
|
- screenshotsAndBlurryCard(),
|
|
|
- SizedBox(height: 40.h),
|
|
|
- ],
|
|
|
- )),
|
|
|
+ children: [
|
|
|
+ titleCard(),
|
|
|
+ storageCard(),
|
|
|
+ similarCard(),
|
|
|
+ quickPhotoCard(),
|
|
|
+ peopleCard(),
|
|
|
+ // locationsCard(),
|
|
|
+ screenshotsAndBlurryCard(),
|
|
|
+ SizedBox(height: 40.h),
|
|
|
+ ],
|
|
|
+ )),
|
|
|
),
|
|
|
IgnorePointer(
|
|
|
child: Assets.images.bgHome.image(
|
|
|
@@ -187,7 +187,7 @@ class HomePage extends BaseView<HomeController> {
|
|
|
controller.totalSpace.value),
|
|
|
style: TextStyle(
|
|
|
color:
|
|
|
- Colors.white.withValues(alpha: 0.6000000238418579),
|
|
|
+ Colors.white.withValues(alpha: 0.6000000238418579),
|
|
|
fontSize: 13.sp,
|
|
|
fontWeight: FontWeight.w400,
|
|
|
),
|
|
|
@@ -196,7 +196,7 @@ class HomePage extends BaseView<HomeController> {
|
|
|
text: 'GB',
|
|
|
style: TextStyle(
|
|
|
color:
|
|
|
- Colors.white.withValues(alpha: 0.6000000238418579),
|
|
|
+ Colors.white.withValues(alpha: 0.6000000238418579),
|
|
|
fontSize: 13.sp,
|
|
|
fontWeight: FontWeight.w500,
|
|
|
),
|
|
|
@@ -379,11 +379,26 @@ class HomePage extends BaseView<HomeController> {
|
|
|
return Row(
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
children: List.generate(4, (index) {
|
|
|
+ if (!controller.isSimilarScanned.value) {
|
|
|
+ return ImageContainer(
|
|
|
+ size: 70.w,
|
|
|
+ image: Opacity(
|
|
|
+ opacity: 0.22,
|
|
|
+ child: Lottie.asset(
|
|
|
+ Assets.anim.animLoadingPhoto,
|
|
|
+ repeat: true,
|
|
|
+ width: 100.w,
|
|
|
+ height: 100.w,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
var image = Assets.images.iconHomeNoPhoto.image(
|
|
|
width: 70.w * 0.45,
|
|
|
height: 70.w * 0.45,
|
|
|
);
|
|
|
- if (controller.similarPhotos.length > index) {
|
|
|
+ if (controller.isSimilarScanned.value &&
|
|
|
+ controller.similarPhotos.length > index) {
|
|
|
image = AssetEntityImage(
|
|
|
width: 70.w,
|
|
|
height: 70.w,
|
|
|
@@ -398,29 +413,7 @@ class HomePage extends BaseView<HomeController> {
|
|
|
);
|
|
|
});
|
|
|
}
|
|
|
- return controller.similarPhotos.isNotEmpty
|
|
|
- ? image
|
|
|
- : ImageContainer(
|
|
|
- size: 70.w,
|
|
|
- image: Opacity(
|
|
|
- opacity: 0.22,
|
|
|
- child: Lottie.asset(Assets.anim.animNoPhoto,
|
|
|
- repeat: true, width: 100.w, height: 100.w),
|
|
|
- ),
|
|
|
- // AssetEntityImage(
|
|
|
- // width: 70.w,
|
|
|
- // height: 70.w,
|
|
|
- // controller.similarPhotos[index],
|
|
|
- // isOriginal: false,
|
|
|
- // thumbnailSize: const ThumbnailSize.square(300),
|
|
|
- // fit: BoxFit.cover,
|
|
|
- // errorBuilder: (context, error, stackTrace) {
|
|
|
- // return Assets.images.iconHomeNoPhoto.image(
|
|
|
- // width: 70.w * 0.45,
|
|
|
- // height: 70.w * 0.45,
|
|
|
- // );
|
|
|
- // },
|
|
|
- );
|
|
|
+ return ImageContainer(size: 70.w, image: image);
|
|
|
}),
|
|
|
);
|
|
|
}),
|
|
|
@@ -483,6 +476,16 @@ class HomePage extends BaseView<HomeController> {
|
|
|
return Row(
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
children: List.generate(2, (index) {
|
|
|
+ if (!controller.isPeopleScanned.value) {
|
|
|
+ return ImageContainer(
|
|
|
+ size: 146.w,
|
|
|
+ image: Opacity(
|
|
|
+ opacity: 0.22,
|
|
|
+ child: Lottie.asset(Assets.anim.animLoadingPhoto,
|
|
|
+ repeat: true, width: 100.w, height: 100.w),
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
var image = Assets.images.iconHomeNoPhoto.image(
|
|
|
width: 146.w * 0.45,
|
|
|
height: 146.w * 0.45,
|
|
|
@@ -496,20 +499,14 @@ class HomePage extends BaseView<HomeController> {
|
|
|
thumbnailSize: const ThumbnailSize.square(300),
|
|
|
fit: BoxFit.cover,
|
|
|
errorBuilder: (context, error, stackTrace) {
|
|
|
- return Assets.images.iconHomeNoPhoto.image(
|
|
|
- width: 146.w * 0.45,
|
|
|
- height: 146.w * 0.45,
|
|
|
- );
|
|
|
- });
|
|
|
+ return Assets.images.iconHomeNoPhoto.image(
|
|
|
+ width: 146.w * 0.45,
|
|
|
+ height: 146.w * 0.45,
|
|
|
+ );
|
|
|
+ });
|
|
|
}
|
|
|
return ImageContainer(
|
|
|
- image: controller.peoplePhotos.length > index ? image : Opacity(
|
|
|
- opacity: 0.22,
|
|
|
- child: Lottie.asset(Assets.anim.animNoPhoto,
|
|
|
- repeat: true,
|
|
|
- width: 140.w,
|
|
|
- height: 140.w),
|
|
|
- ),
|
|
|
+ image: image,
|
|
|
size: 146.w,
|
|
|
// Image.file(
|
|
|
// width: 146.w,
|
|
|
@@ -588,27 +585,31 @@ class HomePage extends BaseView<HomeController> {
|
|
|
),
|
|
|
),
|
|
|
child: Obx(() {
|
|
|
+
|
|
|
return Center(
|
|
|
child: controller.locationPhoto.value == null
|
|
|
? Opacity(
|
|
|
- opacity: 0.22,
|
|
|
- child: Lottie.asset(Assets.anim.animNoPhoto,
|
|
|
- repeat: true, width: 160.w, height: 160.w),
|
|
|
- )
|
|
|
+ opacity: 0.22,
|
|
|
+ child: Lottie.asset(
|
|
|
+ Assets.anim.animLoadingPhoto,
|
|
|
+ repeat: true,
|
|
|
+ width: 160.w,
|
|
|
+ height: 160.w),
|
|
|
+ )
|
|
|
: AssetEntityImage(
|
|
|
- width: 304.w,
|
|
|
- height: 171.h,
|
|
|
- controller.locationPhoto.value!,
|
|
|
- isOriginal: false,
|
|
|
- thumbnailSize: const ThumbnailSize.square(300),
|
|
|
- fit: BoxFit.cover,
|
|
|
- errorBuilder: (context, error, stackTrace) {
|
|
|
- return Assets.images.iconHomeNoPhoto.image(
|
|
|
- width: 60.w,
|
|
|
- height: 60.h,
|
|
|
- );
|
|
|
- },
|
|
|
- ),
|
|
|
+ width: 304.w,
|
|
|
+ height: 171.h,
|
|
|
+ controller.locationPhoto.value!,
|
|
|
+ isOriginal: false,
|
|
|
+ thumbnailSize: const ThumbnailSize.square(300),
|
|
|
+ fit: BoxFit.cover,
|
|
|
+ errorBuilder: (context, error, stackTrace) {
|
|
|
+ return Assets.images.iconHomeNoPhoto.image(
|
|
|
+ width: 60.w,
|
|
|
+ height: 60.h,
|
|
|
+ );
|
|
|
+ },
|
|
|
+ ),
|
|
|
// Image.file(
|
|
|
// width: 304.w,
|
|
|
// height: 171.h,
|
|
|
@@ -655,26 +656,31 @@ class HomePage extends BaseView<HomeController> {
|
|
|
: 'Clean up',
|
|
|
ImagePickerUtil.formatFileSize(
|
|
|
ImagePickerUtil.screenshotsSize.value),
|
|
|
- controller.screenshotPhoto.value == null
|
|
|
+ !controller.isScreenShotScanned.value
|
|
|
? Opacity(
|
|
|
- opacity: 0.22,
|
|
|
- child: Lottie.asset(Assets.anim.animNoPhoto,
|
|
|
- repeat: true, width: 100.w, height: 100.w),
|
|
|
- )
|
|
|
+ opacity: 0.22,
|
|
|
+ child: Lottie.asset(Assets.anim.animLoadingPhoto,
|
|
|
+ repeat: true, width: 100.w, height: 100.w),
|
|
|
+ ):
|
|
|
+ controller.screenshotPhoto.value == null
|
|
|
+ ? Assets.images.iconHomeNoPhoto.image(
|
|
|
+ width: 60.w,
|
|
|
+ height: 60.h,
|
|
|
+ )
|
|
|
: AssetEntityImage(
|
|
|
- width: 144.w,
|
|
|
- height: 142.h,
|
|
|
- controller.screenshotPhoto.value!,
|
|
|
- isOriginal: false,
|
|
|
- thumbnailSize: const ThumbnailSize.square(300),
|
|
|
- fit: BoxFit.cover,
|
|
|
- errorBuilder: (context, error, stackTrace) {
|
|
|
- return Assets.images.iconHomeNoPhoto.image(
|
|
|
- width: 60.w,
|
|
|
- height: 60.h,
|
|
|
- );
|
|
|
- },
|
|
|
- ),
|
|
|
+ width: 144.w,
|
|
|
+ height: 142.h,
|
|
|
+ controller.screenshotPhoto.value!,
|
|
|
+ isOriginal: false,
|
|
|
+ thumbnailSize: const ThumbnailSize.square(300),
|
|
|
+ fit: BoxFit.cover,
|
|
|
+ errorBuilder: (context, error, stackTrace) {
|
|
|
+ return Assets.images.iconHomeNoPhoto.image(
|
|
|
+ width: 60.w,
|
|
|
+ height: 60.h,
|
|
|
+ );
|
|
|
+ },
|
|
|
+ ),
|
|
|
onTap: () {
|
|
|
controller.screenshotCleanClick();
|
|
|
},
|
|
|
@@ -684,26 +690,30 @@ class HomePage extends BaseView<HomeController> {
|
|
|
!controller.isBlurryScanned.value ? 'Scanning...' : 'Clean up',
|
|
|
ImagePickerUtil.formatFileSize(
|
|
|
ImagePickerUtil.blurrySize.value),
|
|
|
- controller.blurryPhoto.value == null
|
|
|
- ? Opacity(
|
|
|
- opacity: 0.22,
|
|
|
- child: Lottie.asset(Assets.anim.animNoPhoto,
|
|
|
- repeat: true, width: 100.w, height: 100.w),
|
|
|
- )
|
|
|
+ !controller.isBlurryScanned.value?
|
|
|
+ Opacity(
|
|
|
+ opacity: 0.22,
|
|
|
+ child: Lottie.asset(Assets.anim.animLoadingPhoto,
|
|
|
+ repeat: true, width: 100.w, height: 100.w),
|
|
|
+ ): controller.blurryPhoto.value == null
|
|
|
+ ? Assets.images.iconHomeNoPhoto.image(
|
|
|
+ width: 60.w,
|
|
|
+ height: 60.w,
|
|
|
+ )
|
|
|
: AssetEntityImage(
|
|
|
- width: 144.w,
|
|
|
- height: 142.h,
|
|
|
- controller.blurryPhoto.value!,
|
|
|
- isOriginal: false,
|
|
|
- thumbnailSize: const ThumbnailSize.square(300),
|
|
|
- fit: BoxFit.cover,
|
|
|
- errorBuilder: (context, error, stackTrace) {
|
|
|
- return Assets.images.iconHomeNoPhoto.image(
|
|
|
- width: 60.w,
|
|
|
- height: 60.h,
|
|
|
- );
|
|
|
- },
|
|
|
- ), onTap: () {
|
|
|
+ width: 144.w,
|
|
|
+ height: 142.h,
|
|
|
+ controller.blurryPhoto.value!,
|
|
|
+ isOriginal: false,
|
|
|
+ thumbnailSize: const ThumbnailSize.square(300),
|
|
|
+ fit: BoxFit.cover,
|
|
|
+ errorBuilder: (context, error, stackTrace) {
|
|
|
+ return Assets.images.iconHomeNoPhoto.image(
|
|
|
+ width: 60.w,
|
|
|
+ height: 60.h,
|
|
|
+ );
|
|
|
+ },
|
|
|
+ ), onTap: () {
|
|
|
controller.blurryCleanClick();
|
|
|
}),
|
|
|
],
|