|
|
@@ -34,22 +34,21 @@ 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(
|
|
|
width: 360.w,
|
|
|
-
|
|
|
),
|
|
|
),
|
|
|
],
|
|
|
@@ -120,7 +119,7 @@ class HomePage extends BaseView<HomeController> {
|
|
|
Colors.red),
|
|
|
PieData(
|
|
|
'Unused Space',
|
|
|
- controller.freeSpacePercentage,
|
|
|
+ controller.isStorageScanned.value? controller.freeSpacePercentage: 100,
|
|
|
Colors.white.withValues(alpha: 0.10000000149011612),
|
|
|
),
|
|
|
],
|
|
|
@@ -141,51 +140,53 @@ class HomePage extends BaseView<HomeController> {
|
|
|
CircularChartAnnotation(
|
|
|
widget: Container(
|
|
|
child: Column(
|
|
|
- mainAxisSize: MainAxisSize.min,
|
|
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
+ mainAxisSize: MainAxisSize.min,
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
+ children: [
|
|
|
+ Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
children: [
|
|
|
- Row(
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
- crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
- children: [
|
|
|
- Obx(() {
|
|
|
- return Text(
|
|
|
- controller.usedSpacePercentage.toStringAsFixed(0),
|
|
|
- textAlign: TextAlign.end,
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.white
|
|
|
- .withValues(alpha: 0.8999999761581421),
|
|
|
- fontSize: 30.sp,
|
|
|
- height: 1,
|
|
|
- fontWeight: FontWeight.w400,
|
|
|
- ),
|
|
|
- );
|
|
|
- }),
|
|
|
- Text(
|
|
|
- '%',
|
|
|
- textAlign: TextAlign.end,
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.white
|
|
|
- .withValues(alpha: 0.8999999761581421),
|
|
|
- fontSize: 14.87.r,
|
|
|
- fontWeight: FontWeight.w500,
|
|
|
- ),
|
|
|
+ Obx(() {
|
|
|
+ return Text(
|
|
|
+ controller.isStorageScanned.value
|
|
|
+ ? controller.usedSpacePercentage
|
|
|
+ .toStringAsFixed(0)
|
|
|
+ : "0",
|
|
|
+ textAlign: TextAlign.end,
|
|
|
+ style: TextStyle(
|
|
|
+ color: Colors.white
|
|
|
+ .withValues(alpha: 0.8999999761581421),
|
|
|
+ fontSize: 30.sp,
|
|
|
+ height: 1,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
),
|
|
|
- ],
|
|
|
- ),
|
|
|
+ );
|
|
|
+ }),
|
|
|
Text(
|
|
|
- 'used',
|
|
|
- textAlign: TextAlign.center,
|
|
|
+ '%',
|
|
|
+ textAlign: TextAlign.end,
|
|
|
style: TextStyle(
|
|
|
- color: Colors.white.withValues(
|
|
|
- alpha: 0.6000000238418579),
|
|
|
+ color: Colors.white
|
|
|
+ .withValues(alpha: 0.8999999761581421),
|
|
|
fontSize: 14.87.r,
|
|
|
- height: 1,
|
|
|
fontWeight: FontWeight.w500,
|
|
|
),
|
|
|
- )
|
|
|
+ ),
|
|
|
],
|
|
|
- )),
|
|
|
+ ),
|
|
|
+ Text(
|
|
|
+ controller.isStorageScanned.value ? 'used' : 'Scanning...',
|
|
|
+ textAlign: TextAlign.center,
|
|
|
+ style: TextStyle(
|
|
|
+ color: Colors.white.withValues(alpha: 0.6000000238418579),
|
|
|
+ fontSize:controller.isStorageScanned.value? 14.87.sp: 12.sp,
|
|
|
+ height: 1,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ )),
|
|
|
horizontalAlignment: ChartAlignment.center,
|
|
|
verticalAlignment: ChartAlignment.center,
|
|
|
radius: '0%',
|
|
|
@@ -256,7 +257,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,
|
|
|
),
|
|
|
@@ -265,7 +266,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,
|
|
|
),
|
|
|
@@ -426,7 +427,7 @@ class HomePage extends BaseView<HomeController> {
|
|
|
Obx(() {
|
|
|
return CleanUpButton(
|
|
|
label:
|
|
|
- !controller.isScanned.value ? 'Scanning...' : 'Clean up',
|
|
|
+ !controller.isScanned.value ? 'Scanning...' : 'Clean up',
|
|
|
size: ImagePickerUtil.formatFileSize(
|
|
|
ImagePickerUtil.similarPhotosSize.value),
|
|
|
onTap: () {
|
|
|
@@ -455,11 +456,11 @@ class HomePage extends BaseView<HomeController> {
|
|
|
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 Assets.images.iconHomeNoPhoto.image(
|
|
|
+ width: 70.w * 0.45,
|
|
|
+ height: 70.w * 0.45,
|
|
|
+ );
|
|
|
+ });
|
|
|
}
|
|
|
return ImageContainer(
|
|
|
size: 70.w,
|
|
|
@@ -549,11 +550,11 @@ 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: image,
|
|
|
@@ -632,23 +633,23 @@ class HomePage extends BaseView<HomeController> {
|
|
|
return Center(
|
|
|
child: controller.locationPhoto.value == null
|
|
|
? Assets.images.iconHomeNoPhoto.image(
|
|
|
- width: 60.w,
|
|
|
- height: 60.h,
|
|
|
- )
|
|
|
+ width: 60.w,
|
|
|
+ height: 60.h,
|
|
|
+ )
|
|
|
: 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,
|
|
|
@@ -695,23 +696,23 @@ class HomePage extends BaseView<HomeController> {
|
|
|
ImagePickerUtil.screenshotsSize.value),
|
|
|
controller.screenshotPhoto.value == null
|
|
|
? Assets.images.iconHomeNoPhoto.image(
|
|
|
- width: 60.w,
|
|
|
- height: 60.h,
|
|
|
- )
|
|
|
+ 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();
|
|
|
},
|
|
|
@@ -723,23 +724,23 @@ class HomePage extends BaseView<HomeController> {
|
|
|
ImagePickerUtil.blurrySize.value),
|
|
|
controller.blurryPhoto.value == null
|
|
|
? Assets.images.iconHomeNoPhoto.image(
|
|
|
- width: 60.w,
|
|
|
- height: 60.h,
|
|
|
- )
|
|
|
+ width: 60.w,
|
|
|
+ height: 60.h,
|
|
|
+ )
|
|
|
: 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();
|
|
|
}),
|
|
|
],
|