|
@@ -33,17 +33,17 @@ class HomePage extends BaseView<HomeController> {
|
|
|
SafeArea(
|
|
SafeArea(
|
|
|
child: SingleChildScrollView(
|
|
child: SingleChildScrollView(
|
|
|
child: Column(
|
|
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(
|
|
IgnorePointer(
|
|
|
child: Assets.images.bgHome.image(
|
|
child: Assets.images.bgHome.image(
|
|
@@ -144,50 +144,51 @@ class HomePage extends BaseView<HomeController> {
|
|
|
CircularChartAnnotation(
|
|
CircularChartAnnotation(
|
|
|
widget: Container(
|
|
widget: Container(
|
|
|
child: Column(
|
|
child: Column(
|
|
|
- mainAxisSize: MainAxisSize.min,
|
|
|
|
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
- children: [
|
|
|
|
|
- Row(
|
|
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
- crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
|
|
+ mainAxisSize: MainAxisSize.min,
|
|
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
children: [
|
|
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,
|
|
|
|
|
|
|
+ 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,
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
- );
|
|
|
|
|
- }),
|
|
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
Text(
|
|
Text(
|
|
|
- '%',
|
|
|
|
|
- textAlign: TextAlign.end,
|
|
|
|
|
|
|
+ 'used',
|
|
|
|
|
+ textAlign: TextAlign.center,
|
|
|
style: TextStyle(
|
|
style: TextStyle(
|
|
|
- color: Colors.white
|
|
|
|
|
- .withValues(alpha: 0.8999999761581421),
|
|
|
|
|
|
|
+ color: Colors.white.withValues(
|
|
|
|
|
+ alpha: 0.6000000238418579),
|
|
|
fontSize: 14.87.r,
|
|
fontSize: 14.87.r,
|
|
|
|
|
+ height: 1,
|
|
|
fontWeight: FontWeight.w500,
|
|
fontWeight: FontWeight.w500,
|
|
|
),
|
|
),
|
|
|
- ),
|
|
|
|
|
|
|
+ )
|
|
|
],
|
|
],
|
|
|
- ),
|
|
|
|
|
- Text(
|
|
|
|
|
- 'used',
|
|
|
|
|
- textAlign: TextAlign.center,
|
|
|
|
|
- style: TextStyle(
|
|
|
|
|
- color: Colors.white.withValues(alpha: 0.6000000238418579),
|
|
|
|
|
- fontSize: 14.87.r,
|
|
|
|
|
- height: 1,
|
|
|
|
|
- fontWeight: FontWeight.w500,
|
|
|
|
|
- ),
|
|
|
|
|
- )
|
|
|
|
|
- ],
|
|
|
|
|
- )),
|
|
|
|
|
|
|
+ )),
|
|
|
horizontalAlignment: ChartAlignment.center,
|
|
horizontalAlignment: ChartAlignment.center,
|
|
|
verticalAlignment: ChartAlignment.center,
|
|
verticalAlignment: ChartAlignment.center,
|
|
|
radius: '0%',
|
|
radius: '0%',
|
|
@@ -256,7 +257,7 @@ class HomePage extends BaseView<HomeController> {
|
|
|
text: controller.totalSpace.toStringAsFixed(1),
|
|
text: controller.totalSpace.toStringAsFixed(1),
|
|
|
style: TextStyle(
|
|
style: TextStyle(
|
|
|
color:
|
|
color:
|
|
|
- Colors.white.withValues(alpha: 0.6000000238418579),
|
|
|
|
|
|
|
+ Colors.white.withValues(alpha: 0.6000000238418579),
|
|
|
fontSize: 13.sp,
|
|
fontSize: 13.sp,
|
|
|
fontWeight: FontWeight.w400,
|
|
fontWeight: FontWeight.w400,
|
|
|
),
|
|
),
|
|
@@ -265,7 +266,7 @@ class HomePage extends BaseView<HomeController> {
|
|
|
text: 'GB',
|
|
text: 'GB',
|
|
|
style: TextStyle(
|
|
style: TextStyle(
|
|
|
color:
|
|
color:
|
|
|
- Colors.white.withValues(alpha: 0.6000000238418579),
|
|
|
|
|
|
|
+ Colors.white.withValues(alpha: 0.6000000238418579),
|
|
|
fontSize: 13.sp,
|
|
fontSize: 13.sp,
|
|
|
fontWeight: FontWeight.w500,
|
|
fontWeight: FontWeight.w500,
|
|
|
),
|
|
),
|
|
@@ -421,13 +422,16 @@ class HomePage extends BaseView<HomeController> {
|
|
|
),
|
|
),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
- CleanUpButton(
|
|
|
|
|
- label: 'Clean up',
|
|
|
|
|
- size: '0 GB',
|
|
|
|
|
- onTap: () {
|
|
|
|
|
- controller.similarCleanClick();
|
|
|
|
|
- },
|
|
|
|
|
- ),
|
|
|
|
|
|
|
+ Obx(() {
|
|
|
|
|
+ return CleanUpButton(
|
|
|
|
|
+ label: 'Clean up',
|
|
|
|
|
+ size: ImagePickerUtil.formatFileSize(
|
|
|
|
|
+ ImagePickerUtil.similarPhotosSize.value),
|
|
|
|
|
+ onTap: () {
|
|
|
|
|
+ controller.similarCleanClick();
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ }),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
// SizedBox(height: 19.h),
|
|
// SizedBox(height: 19.h),
|
|
@@ -440,23 +444,23 @@ class HomePage extends BaseView<HomeController> {
|
|
|
size: 70.w,
|
|
size: 70.w,
|
|
|
image: controller.similarPhotos.length < 4
|
|
image: controller.similarPhotos.length < 4
|
|
|
? Assets.images.iconHomeNoPhoto.image(
|
|
? Assets.images.iconHomeNoPhoto.image(
|
|
|
- width: 70.w * 0.45,
|
|
|
|
|
- height: 70.w * 0.45,
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ width: 70.w * 0.45,
|
|
|
|
|
+ height: 70.w * 0.45,
|
|
|
|
|
+ )
|
|
|
: AssetEntityImage(
|
|
: 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,
|
|
|
|
|
- );
|
|
|
|
|
- },
|
|
|
|
|
- ));
|
|
|
|
|
|
|
+ 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,
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
|
|
+ ));
|
|
|
}),
|
|
}),
|
|
|
);
|
|
);
|
|
|
}),
|
|
}),
|
|
@@ -518,15 +522,15 @@ class HomePage extends BaseView<HomeController> {
|
|
|
return ImageContainer(
|
|
return ImageContainer(
|
|
|
image: controller.peoplePhotos.length < 2
|
|
image: controller.peoplePhotos.length < 2
|
|
|
? Assets.images.iconHomeNoPhoto.image(
|
|
? Assets.images.iconHomeNoPhoto.image(
|
|
|
- width: 146.w * 0.45,
|
|
|
|
|
- height: 146.w * 0.45,
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ width: 146.w * 0.45,
|
|
|
|
|
+ height: 146.w * 0.45,
|
|
|
|
|
+ )
|
|
|
: Image.file(
|
|
: Image.file(
|
|
|
- width: 146.w,
|
|
|
|
|
- height: 146.w,
|
|
|
|
|
- controller.peoplePhotos[index],
|
|
|
|
|
- fit: BoxFit.cover,
|
|
|
|
|
- ),
|
|
|
|
|
|
|
+ width: 146.w,
|
|
|
|
|
+ height: 146.w,
|
|
|
|
|
+ controller.peoplePhotos[index],
|
|
|
|
|
+ fit: BoxFit.cover,
|
|
|
|
|
+ ),
|
|
|
// 可以传入不同的路径
|
|
// 可以传入不同的路径
|
|
|
size: 146.w,
|
|
size: 146.w,
|
|
|
);
|
|
);
|
|
@@ -539,13 +543,16 @@ class HomePage extends BaseView<HomeController> {
|
|
|
Positioned(
|
|
Positioned(
|
|
|
bottom: 20.h,
|
|
bottom: 20.h,
|
|
|
right: 20.w,
|
|
right: 20.w,
|
|
|
- child: CleanUpButton(
|
|
|
|
|
- label: 'Clean up',
|
|
|
|
|
- size: '0 GB',
|
|
|
|
|
- onTap: () {
|
|
|
|
|
- controller.peopleCleanClick();
|
|
|
|
|
- },
|
|
|
|
|
- ),
|
|
|
|
|
|
|
+ child: Obx(() {
|
|
|
|
|
+ return CleanUpButton(
|
|
|
|
|
+ label: 'Clean up',
|
|
|
|
|
+ size: ImagePickerUtil.formatFileSize(
|
|
|
|
|
+ ImagePickerUtil.peopleSize.value),
|
|
|
|
|
+ onTap: () {
|
|
|
|
|
+ controller.peopleCleanClick();
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ }),
|
|
|
),
|
|
),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
@@ -593,15 +600,15 @@ class HomePage extends BaseView<HomeController> {
|
|
|
return Center(
|
|
return Center(
|
|
|
child: controller.locationPhoto.value == null
|
|
child: controller.locationPhoto.value == null
|
|
|
? Assets.images.iconHomeNoPhoto.image(
|
|
? Assets.images.iconHomeNoPhoto.image(
|
|
|
- width: 60.w,
|
|
|
|
|
- height: 60.h,
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ width: 60.w,
|
|
|
|
|
+ height: 60.h,
|
|
|
|
|
+ )
|
|
|
: Image.file(
|
|
: Image.file(
|
|
|
- width: 304.w,
|
|
|
|
|
- height: 171.h,
|
|
|
|
|
- controller.locationPhoto.value!,
|
|
|
|
|
- fit: BoxFit.cover,
|
|
|
|
|
- ),
|
|
|
|
|
|
|
+ width: 304.w,
|
|
|
|
|
+ height: 171.h,
|
|
|
|
|
+ controller.locationPhoto.value!,
|
|
|
|
|
+ fit: BoxFit.cover,
|
|
|
|
|
+ ),
|
|
|
);
|
|
);
|
|
|
}),
|
|
}),
|
|
|
),
|
|
),
|
|
@@ -611,13 +618,16 @@ class HomePage extends BaseView<HomeController> {
|
|
|
Positioned(
|
|
Positioned(
|
|
|
bottom: 20.h,
|
|
bottom: 20.h,
|
|
|
right: 8.w,
|
|
right: 8.w,
|
|
|
- child: CleanUpButton(
|
|
|
|
|
- label: 'Clean up',
|
|
|
|
|
- size: '0 GB',
|
|
|
|
|
- onTap: () {
|
|
|
|
|
- controller.locationCleanClick();
|
|
|
|
|
- },
|
|
|
|
|
- ),
|
|
|
|
|
|
|
+ child: Obx(() {
|
|
|
|
|
+ return CleanUpButton(
|
|
|
|
|
+ label: 'Clean up',
|
|
|
|
|
+ size: ImagePickerUtil.formatFileSize(
|
|
|
|
|
+ ImagePickerUtil.locationsSize.value),
|
|
|
|
|
+ onTap: () {
|
|
|
|
|
+ controller.locationCleanClick();
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ }),
|
|
|
),
|
|
),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
@@ -635,24 +645,26 @@ class HomePage extends BaseView<HomeController> {
|
|
|
_buildCard(
|
|
_buildCard(
|
|
|
'Screenshots',
|
|
'Screenshots',
|
|
|
'Clean up',
|
|
'Clean up',
|
|
|
- '0 GB',
|
|
|
|
|
|
|
+ ImagePickerUtil.formatFileSize(
|
|
|
|
|
+ ImagePickerUtil.screenshotsSize.value),
|
|
|
controller.screenshotPhoto.value == null
|
|
controller.screenshotPhoto.value == null
|
|
|
? Assets.images.iconHomeNoPhoto.image(
|
|
? Assets.images.iconHomeNoPhoto.image(
|
|
|
- width: 60.w,
|
|
|
|
|
- height: 60.h,
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ width: 60.w,
|
|
|
|
|
+ height: 60.h,
|
|
|
|
|
+ )
|
|
|
: Image.file(
|
|
: Image.file(
|
|
|
- width: 144.w,
|
|
|
|
|
- height: 142.h,
|
|
|
|
|
- controller.screenshotPhoto.value!,
|
|
|
|
|
- fit: BoxFit.cover,
|
|
|
|
|
- ), onTap: () {
|
|
|
|
|
|
|
+ width: 144.w,
|
|
|
|
|
+ height: 142.h,
|
|
|
|
|
+ controller.screenshotPhoto.value!,
|
|
|
|
|
+ fit: BoxFit.cover,
|
|
|
|
|
+ ), onTap: () {
|
|
|
controller.screenshotCleanClick();
|
|
controller.screenshotCleanClick();
|
|
|
}),
|
|
}),
|
|
|
_buildCard(
|
|
_buildCard(
|
|
|
'Blurry',
|
|
'Blurry',
|
|
|
'Clean up',
|
|
'Clean up',
|
|
|
- '0 GB',
|
|
|
|
|
|
|
+ ImagePickerUtil.formatFileSize(
|
|
|
|
|
+ ImagePickerUtil.screenshotsSize.value),
|
|
|
Assets.images.iconHomeNoPhoto.image(
|
|
Assets.images.iconHomeNoPhoto.image(
|
|
|
width: 60.w,
|
|
width: 60.w,
|
|
|
height: 60.h,
|
|
height: 60.h,
|