|
@@ -10,6 +10,7 @@ import 'package:clean/utils/image_util.dart';
|
|
|
import 'package:get/get.dart';
|
|
import 'package:get/get.dart';
|
|
|
import 'package:flutter/Material.dart';
|
|
import 'package:flutter/Material.dart';
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
|
+import 'package:lottie/lottie.dart';
|
|
|
import 'package:syncfusion_flutter_charts/charts.dart';
|
|
import 'package:syncfusion_flutter_charts/charts.dart';
|
|
|
import 'package:wechat_assets_picker/wechat_assets_picker.dart';
|
|
import 'package:wechat_assets_picker/wechat_assets_picker.dart';
|
|
|
|
|
|
|
@@ -119,7 +120,9 @@ class HomePage extends BaseView<HomeController> {
|
|
|
Colors.red),
|
|
Colors.red),
|
|
|
PieData(
|
|
PieData(
|
|
|
'Unused Space',
|
|
'Unused Space',
|
|
|
- controller.isStorageScanned.value? controller.freeSpacePercentage: 100,
|
|
|
|
|
|
|
+ controller.isStorageScanned.value
|
|
|
|
|
+ ? controller.freeSpacePercentage
|
|
|
|
|
+ : 100,
|
|
|
Colors.white.withValues(alpha: 0.10000000149011612),
|
|
Colors.white.withValues(alpha: 0.10000000149011612),
|
|
|
),
|
|
),
|
|
|
],
|
|
],
|
|
@@ -180,7 +183,8 @@ class HomePage extends BaseView<HomeController> {
|
|
|
textAlign: TextAlign.center,
|
|
textAlign: TextAlign.center,
|
|
|
style: TextStyle(
|
|
style: TextStyle(
|
|
|
color: Colors.white.withValues(alpha: 0.6000000238418579),
|
|
color: Colors.white.withValues(alpha: 0.6000000238418579),
|
|
|
- fontSize:controller.isStorageScanned.value? 14.87.sp: 12.sp,
|
|
|
|
|
|
|
+ fontSize:
|
|
|
|
|
+ controller.isStorageScanned.value ? 14.87.sp : 12.sp,
|
|
|
height: 1,
|
|
height: 1,
|
|
|
fontWeight: FontWeight.w500,
|
|
fontWeight: FontWeight.w500,
|
|
|
),
|
|
),
|
|
@@ -368,7 +372,10 @@ class HomePage extends BaseView<HomeController> {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Widget similarCard() {
|
|
Widget similarCard() {
|
|
|
- return Container(
|
|
|
|
|
|
|
+ return GestureDetector(onTap: () {
|
|
|
|
|
+ controller.similarCleanClick();
|
|
|
|
|
+ },
|
|
|
|
|
+ child: Container(
|
|
|
width: 328.w,
|
|
width: 328.w,
|
|
|
height: 155.h,
|
|
height: 155.h,
|
|
|
margin: EdgeInsets.only(top: 20.h),
|
|
margin: EdgeInsets.only(top: 20.h),
|
|
@@ -427,7 +434,7 @@ class HomePage extends BaseView<HomeController> {
|
|
|
Obx(() {
|
|
Obx(() {
|
|
|
return CleanUpButton(
|
|
return CleanUpButton(
|
|
|
label:
|
|
label:
|
|
|
- !controller.isScanned.value ? 'Scanning...' : 'Clean up',
|
|
|
|
|
|
|
+ !controller.isScanned.value ? 'Scanning...' : 'Clean up',
|
|
|
size: ImagePickerUtil.formatFileSize(
|
|
size: ImagePickerUtil.formatFileSize(
|
|
|
ImagePickerUtil.similarPhotosSize.value),
|
|
ImagePickerUtil.similarPhotosSize.value),
|
|
|
onTap: () {
|
|
onTap: () {
|
|
@@ -456,15 +463,19 @@ class HomePage extends BaseView<HomeController> {
|
|
|
thumbnailSize: const ThumbnailSize.square(300),
|
|
thumbnailSize: const ThumbnailSize.square(300),
|
|
|
fit: BoxFit.cover,
|
|
fit: BoxFit.cover,
|
|
|
errorBuilder: (context, error, stackTrace) {
|
|
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(
|
|
return ImageContainer(
|
|
|
size: 70.w,
|
|
size: 70.w,
|
|
|
- image: image,
|
|
|
|
|
|
|
+ image: Opacity(
|
|
|
|
|
+ opacity: 0.22,
|
|
|
|
|
+ child: Lottie.asset(Assets.anim.animNoPhoto,
|
|
|
|
|
+ repeat: true, width: 100.w, height: 100.w),
|
|
|
|
|
+ ),
|
|
|
// AssetEntityImage(
|
|
// AssetEntityImage(
|
|
|
// width: 70.w,
|
|
// width: 70.w,
|
|
|
// height: 70.w,
|
|
// height: 70.w,
|
|
@@ -485,7 +496,7 @@ class HomePage extends BaseView<HomeController> {
|
|
|
Spacer(),
|
|
Spacer(),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
- );
|
|
|
|
|
|
|
+ ));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Widget quickPhotoCard() {
|
|
Widget quickPhotoCard() {
|
|
@@ -505,180 +516,197 @@ class HomePage extends BaseView<HomeController> {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Widget peopleCard() {
|
|
Widget peopleCard() {
|
|
|
- return Container(
|
|
|
|
|
- margin: EdgeInsets.only(top: 12.h),
|
|
|
|
|
- width: 328.w,
|
|
|
|
|
- height: 205.h,
|
|
|
|
|
- decoration: ShapeDecoration(
|
|
|
|
|
- color: Colors.white.withValues(alpha: 0.12),
|
|
|
|
|
- shape: RoundedRectangleBorder(
|
|
|
|
|
- borderRadius: BorderRadius.circular(14.sp),
|
|
|
|
|
- ),
|
|
|
|
|
- ),
|
|
|
|
|
- child: Stack(
|
|
|
|
|
- children: [
|
|
|
|
|
- Column(
|
|
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
+ return GestureDetector(
|
|
|
|
|
+ onTap: () {
|
|
|
|
|
+ controller.peopleCleanClick();
|
|
|
|
|
+ },
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ margin: EdgeInsets.only(top: 12.h),
|
|
|
|
|
+ width: 328.w,
|
|
|
|
|
+ height: 205.h,
|
|
|
|
|
+ decoration: ShapeDecoration(
|
|
|
|
|
+ color: Colors.white.withValues(alpha: 0.12),
|
|
|
|
|
+ shape: RoundedRectangleBorder(
|
|
|
|
|
+ borderRadius: BorderRadius.circular(14.sp),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Stack(
|
|
|
children: [
|
|
children: [
|
|
|
- Spacer(),
|
|
|
|
|
- Padding(
|
|
|
|
|
- padding: EdgeInsets.only(left: 14.0.w),
|
|
|
|
|
- child: Text(
|
|
|
|
|
- 'People',
|
|
|
|
|
- style: TextStyle(
|
|
|
|
|
- color: Colors.white,
|
|
|
|
|
- fontSize: 16.sp,
|
|
|
|
|
- fontWeight: FontWeight.w700,
|
|
|
|
|
|
|
+ Column(
|
|
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Spacer(),
|
|
|
|
|
+ Padding(
|
|
|
|
|
+ padding: EdgeInsets.only(left: 14.0.w),
|
|
|
|
|
+ child: Text(
|
|
|
|
|
+ 'People',
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: Colors.white,
|
|
|
|
|
+ fontSize: 16.sp,
|
|
|
|
|
+ fontWeight: FontWeight.w700,
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
- ),
|
|
|
|
|
- ),
|
|
|
|
|
- Spacer(),
|
|
|
|
|
- Obx(() {
|
|
|
|
|
- return Row(
|
|
|
|
|
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
|
- children: List.generate(2, (index) {
|
|
|
|
|
- var image = Assets.images.iconHomeNoPhoto.image(
|
|
|
|
|
- width: 146.w * 0.45,
|
|
|
|
|
- height: 146.w * 0.45,
|
|
|
|
|
- );
|
|
|
|
|
- if (controller.peoplePhotos.length > index) {
|
|
|
|
|
- image = AssetEntityImage(
|
|
|
|
|
- width: 146.w,
|
|
|
|
|
- height: 146.w,
|
|
|
|
|
- controller.peoplePhotos[index],
|
|
|
|
|
- isOriginal: false,
|
|
|
|
|
- thumbnailSize: const ThumbnailSize.square(300),
|
|
|
|
|
- fit: BoxFit.cover,
|
|
|
|
|
- errorBuilder: (context, error, stackTrace) {
|
|
|
|
|
- return Assets.images.iconHomeNoPhoto.image(
|
|
|
|
|
|
|
+ Spacer(),
|
|
|
|
|
+ Obx(() {
|
|
|
|
|
+ return Row(
|
|
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
|
+ children: List.generate(2, (index) {
|
|
|
|
|
+ var image = Assets.images.iconHomeNoPhoto.image(
|
|
|
width: 146.w * 0.45,
|
|
width: 146.w * 0.45,
|
|
|
height: 146.w * 0.45,
|
|
height: 146.w * 0.45,
|
|
|
);
|
|
);
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- return ImageContainer(
|
|
|
|
|
- image: image,
|
|
|
|
|
- size: 146.w,
|
|
|
|
|
- // Image.file(
|
|
|
|
|
- // width: 146.w,
|
|
|
|
|
- // height: 146.w,
|
|
|
|
|
- // controller.peoplePhotos[index],
|
|
|
|
|
- // fit: BoxFit.cover,
|
|
|
|
|
- // ),
|
|
|
|
|
- // 可以传入不同的路径
|
|
|
|
|
|
|
+ if (controller.peoplePhotos.length > index) {
|
|
|
|
|
+ image = AssetEntityImage(
|
|
|
|
|
+ width: 146.w,
|
|
|
|
|
+ height: 146.w,
|
|
|
|
|
+ controller.peoplePhotos[index],
|
|
|
|
|
+ isOriginal: false,
|
|
|
|
|
+ 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 ImageContainer(
|
|
|
|
|
+ image: Opacity(
|
|
|
|
|
+ opacity: 0.22,
|
|
|
|
|
+ child: Lottie.asset(Assets.anim.animNoPhoto,
|
|
|
|
|
+ repeat: true, width: 140.w, height: 140.w),
|
|
|
|
|
+ ),
|
|
|
|
|
+ size: 146.w,
|
|
|
|
|
+ // Image.file(
|
|
|
|
|
+ // width: 146.w,
|
|
|
|
|
+ // height: 146.w,
|
|
|
|
|
+ // controller.peoplePhotos[index],
|
|
|
|
|
+ // fit: BoxFit.cover,
|
|
|
|
|
+ // ),
|
|
|
|
|
+ // 可以传入不同的路径
|
|
|
|
|
+ );
|
|
|
|
|
+ }),
|
|
|
);
|
|
);
|
|
|
}),
|
|
}),
|
|
|
- );
|
|
|
|
|
- }),
|
|
|
|
|
- Spacer(),
|
|
|
|
|
|
|
+ Spacer(),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ Positioned(
|
|
|
|
|
+ bottom: 20.h,
|
|
|
|
|
+ right: 20.w,
|
|
|
|
|
+ child: Obx(() {
|
|
|
|
|
+ return CleanUpButton(
|
|
|
|
|
+ label: !controller.isScanned.value
|
|
|
|
|
+ ? 'Scanning...'
|
|
|
|
|
+ : 'Clean up',
|
|
|
|
|
+ size: ImagePickerUtil.formatFileSize(
|
|
|
|
|
+ ImagePickerUtil.peopleSize.value),
|
|
|
|
|
+ onTap: () {
|
|
|
|
|
+ controller.peopleCleanClick();
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ }),
|
|
|
|
|
+ ),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
- Positioned(
|
|
|
|
|
- bottom: 20.h,
|
|
|
|
|
- right: 20.w,
|
|
|
|
|
- child: Obx(() {
|
|
|
|
|
- return CleanUpButton(
|
|
|
|
|
- label: !controller.isScanned.value ? 'Scanning...' : 'Clean up',
|
|
|
|
|
- size: ImagePickerUtil.formatFileSize(
|
|
|
|
|
- ImagePickerUtil.peopleSize.value),
|
|
|
|
|
- onTap: () {
|
|
|
|
|
- controller.peopleCleanClick();
|
|
|
|
|
- },
|
|
|
|
|
- );
|
|
|
|
|
- }),
|
|
|
|
|
- ),
|
|
|
|
|
- ],
|
|
|
|
|
- ),
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ ));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Widget locationsCard() {
|
|
Widget locationsCard() {
|
|
|
- return Container(
|
|
|
|
|
- padding: EdgeInsets.symmetric(horizontal: 12.w),
|
|
|
|
|
- margin: EdgeInsets.only(top: 14.h),
|
|
|
|
|
- width: 328.w,
|
|
|
|
|
- height: 230.h,
|
|
|
|
|
- decoration: ShapeDecoration(
|
|
|
|
|
- color: Colors.white.withValues(alpha: 0.12),
|
|
|
|
|
- shape: RoundedRectangleBorder(
|
|
|
|
|
- borderRadius: BorderRadius.circular(14.sp),
|
|
|
|
|
- ),
|
|
|
|
|
- ),
|
|
|
|
|
- child: Stack(
|
|
|
|
|
- children: [
|
|
|
|
|
- Column(
|
|
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
+ return GestureDetector(
|
|
|
|
|
+ onTap: () {
|
|
|
|
|
+ controller.locationCleanClick();
|
|
|
|
|
+ },
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ padding: EdgeInsets.symmetric(horizontal: 12.w),
|
|
|
|
|
+ margin: EdgeInsets.only(top: 14.h),
|
|
|
|
|
+ width: 328.w,
|
|
|
|
|
+ height: 230.h,
|
|
|
|
|
+ decoration: ShapeDecoration(
|
|
|
|
|
+ color: Colors.white.withValues(alpha: 0.12),
|
|
|
|
|
+ shape: RoundedRectangleBorder(
|
|
|
|
|
+ borderRadius: BorderRadius.circular(14.sp),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Stack(
|
|
|
children: [
|
|
children: [
|
|
|
- Spacer(),
|
|
|
|
|
- Text(
|
|
|
|
|
- 'Locations',
|
|
|
|
|
- style: TextStyle(
|
|
|
|
|
- color: Colors.white,
|
|
|
|
|
- fontSize: 16.sp,
|
|
|
|
|
- fontWeight: FontWeight.w700,
|
|
|
|
|
- ),
|
|
|
|
|
- ),
|
|
|
|
|
- Spacer(),
|
|
|
|
|
- Container(
|
|
|
|
|
- width: 304.w,
|
|
|
|
|
- height: 171.h,
|
|
|
|
|
- clipBehavior: Clip.hardEdge,
|
|
|
|
|
- decoration: ShapeDecoration(
|
|
|
|
|
- color: Color(0xFF272C33),
|
|
|
|
|
- shape: RoundedRectangleBorder(
|
|
|
|
|
- borderRadius: BorderRadius.circular(12.r),
|
|
|
|
|
|
|
+ Column(
|
|
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Spacer(),
|
|
|
|
|
+ Text(
|
|
|
|
|
+ 'Locations',
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: Colors.white,
|
|
|
|
|
+ fontSize: 16.sp,
|
|
|
|
|
+ fontWeight: FontWeight.w700,
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
- ),
|
|
|
|
|
|
|
+ Spacer(),
|
|
|
|
|
+ Container(
|
|
|
|
|
+ width: 304.w,
|
|
|
|
|
+ height: 171.h,
|
|
|
|
|
+ clipBehavior: Clip.hardEdge,
|
|
|
|
|
+ decoration: ShapeDecoration(
|
|
|
|
|
+ color: Color(0xFF272C33),
|
|
|
|
|
+ shape: RoundedRectangleBorder(
|
|
|
|
|
+ borderRadius: BorderRadius.circular(12.r),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ 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),
|
|
|
|
|
+ )
|
|
|
|
|
+ : 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,
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
|
|
+ ),
|
|
|
|
|
+ // Image.file(
|
|
|
|
|
+ // width: 304.w,
|
|
|
|
|
+ // height: 171.h,
|
|
|
|
|
+ // controller.locationPhoto.value!,
|
|
|
|
|
+ // fit: BoxFit.cover,
|
|
|
|
|
+ // ),
|
|
|
|
|
+ );
|
|
|
|
|
+ }),
|
|
|
|
|
+ ),
|
|
|
|
|
+ Spacer(),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ Positioned(
|
|
|
|
|
+ bottom: 20.h,
|
|
|
|
|
+ right: 8.w,
|
|
|
child: Obx(() {
|
|
child: Obx(() {
|
|
|
- return Center(
|
|
|
|
|
- child: controller.locationPhoto.value == null
|
|
|
|
|
- ? Assets.images.iconHomeNoPhoto.image(
|
|
|
|
|
- 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,
|
|
|
|
|
- );
|
|
|
|
|
- },
|
|
|
|
|
- ),
|
|
|
|
|
- // Image.file(
|
|
|
|
|
- // width: 304.w,
|
|
|
|
|
- // height: 171.h,
|
|
|
|
|
- // controller.locationPhoto.value!,
|
|
|
|
|
- // fit: BoxFit.cover,
|
|
|
|
|
- // ),
|
|
|
|
|
|
|
+ return CleanUpButton(
|
|
|
|
|
+ label: !controller.isScanned.value
|
|
|
|
|
+ ? 'Scanning...'
|
|
|
|
|
+ : 'Clean up',
|
|
|
|
|
+ size: ImagePickerUtil.formatFileSize(
|
|
|
|
|
+ ImagePickerUtil.locationsSize.value),
|
|
|
|
|
+ onTap: () {
|
|
|
|
|
+ controller.locationCleanClick();
|
|
|
|
|
+ },
|
|
|
);
|
|
);
|
|
|
}),
|
|
}),
|
|
|
),
|
|
),
|
|
|
- Spacer(),
|
|
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
- Positioned(
|
|
|
|
|
- bottom: 20.h,
|
|
|
|
|
- right: 8.w,
|
|
|
|
|
- child: Obx(() {
|
|
|
|
|
- return CleanUpButton(
|
|
|
|
|
- label: !controller.isScanned.value ? 'Scanning...' : 'Clean up',
|
|
|
|
|
- size: ImagePickerUtil.formatFileSize(
|
|
|
|
|
- ImagePickerUtil.locationsSize.value),
|
|
|
|
|
- onTap: () {
|
|
|
|
|
- controller.locationCleanClick();
|
|
|
|
|
- },
|
|
|
|
|
- );
|
|
|
|
|
- }),
|
|
|
|
|
- ),
|
|
|
|
|
- ],
|
|
|
|
|
- ),
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ ));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Widget screenshotsAndBlurryCard() {
|
|
Widget screenshotsAndBlurryCard() {
|
|
@@ -695,9 +723,10 @@ class HomePage extends BaseView<HomeController> {
|
|
|
ImagePickerUtil.formatFileSize(
|
|
ImagePickerUtil.formatFileSize(
|
|
|
ImagePickerUtil.screenshotsSize.value),
|
|
ImagePickerUtil.screenshotsSize.value),
|
|
|
controller.screenshotPhoto.value == null
|
|
controller.screenshotPhoto.value == null
|
|
|
- ? Assets.images.iconHomeNoPhoto.image(
|
|
|
|
|
- width: 60.w,
|
|
|
|
|
- height: 60.h,
|
|
|
|
|
|
|
+ ? Opacity(
|
|
|
|
|
+ opacity: 0.22,
|
|
|
|
|
+ child: Lottie.asset(Assets.anim.animNoPhoto,
|
|
|
|
|
+ repeat: true, width: 100.w, height: 100.w),
|
|
|
)
|
|
)
|
|
|
: AssetEntityImage(
|
|
: AssetEntityImage(
|
|
|
width: 144.w,
|
|
width: 144.w,
|
|
@@ -723,9 +752,10 @@ class HomePage extends BaseView<HomeController> {
|
|
|
ImagePickerUtil.formatFileSize(
|
|
ImagePickerUtil.formatFileSize(
|
|
|
ImagePickerUtil.blurrySize.value),
|
|
ImagePickerUtil.blurrySize.value),
|
|
|
controller.blurryPhoto.value == null
|
|
controller.blurryPhoto.value == null
|
|
|
- ? Assets.images.iconHomeNoPhoto.image(
|
|
|
|
|
- width: 60.w,
|
|
|
|
|
- height: 60.h,
|
|
|
|
|
|
|
+ ? Opacity(
|
|
|
|
|
+ opacity: 0.22,
|
|
|
|
|
+ child: Lottie.asset(Assets.anim.animNoPhoto,
|
|
|
|
|
+ repeat: true, width: 100.w, height: 100.w),
|
|
|
)
|
|
)
|
|
|
: AssetEntityImage(
|
|
: AssetEntityImage(
|
|
|
width: 144.w,
|
|
width: 144.w,
|
|
@@ -749,52 +779,55 @@ class HomePage extends BaseView<HomeController> {
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- Widget _buildCard(String title, String buttonLabel, String size, Image image,
|
|
|
|
|
|
|
+ Widget _buildCard(String title, String buttonLabel, String size, Widget image,
|
|
|
{required Function() onTap}) {
|
|
{required Function() onTap}) {
|
|
|
return Stack(
|
|
return Stack(
|
|
|
children: [
|
|
children: [
|
|
|
- Container(
|
|
|
|
|
- width: 160.w,
|
|
|
|
|
- height: 189.h,
|
|
|
|
|
- decoration: ShapeDecoration(
|
|
|
|
|
- color: Colors.white.withValues(alpha: 0.12),
|
|
|
|
|
- shape: RoundedRectangleBorder(
|
|
|
|
|
- borderRadius: BorderRadius.circular(14.r),
|
|
|
|
|
|
|
+ GestureDetector(
|
|
|
|
|
+ onTap: onTap,
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ width: 160.w,
|
|
|
|
|
+ height: 189.h,
|
|
|
|
|
+ decoration: ShapeDecoration(
|
|
|
|
|
+ color: Colors.white.withValues(alpha: 0.12),
|
|
|
|
|
+ shape: RoundedRectangleBorder(
|
|
|
|
|
+ borderRadius: BorderRadius.circular(14.r),
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
- ),
|
|
|
|
|
- child: Column(
|
|
|
|
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
- children: [
|
|
|
|
|
- Spacer(),
|
|
|
|
|
- Container(
|
|
|
|
|
- alignment: Alignment.centerLeft,
|
|
|
|
|
- padding: EdgeInsets.only(left: 9.w),
|
|
|
|
|
- child: Text(
|
|
|
|
|
- title,
|
|
|
|
|
- style: TextStyle(
|
|
|
|
|
- color: Colors.white,
|
|
|
|
|
- fontSize: 16.sp,
|
|
|
|
|
- fontWeight: FontWeight.w700,
|
|
|
|
|
|
|
+ child: Column(
|
|
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Spacer(),
|
|
|
|
|
+ Container(
|
|
|
|
|
+ alignment: Alignment.centerLeft,
|
|
|
|
|
+ padding: EdgeInsets.only(left: 9.w),
|
|
|
|
|
+ child: Text(
|
|
|
|
|
+ title,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: Colors.white,
|
|
|
|
|
+ fontSize: 16.sp,
|
|
|
|
|
+ fontWeight: FontWeight.w700,
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
- ),
|
|
|
|
|
- Spacer(),
|
|
|
|
|
- Container(
|
|
|
|
|
- width: 144.w,
|
|
|
|
|
- height: 142.h,
|
|
|
|
|
- clipBehavior: Clip.hardEdge,
|
|
|
|
|
- decoration: ShapeDecoration(
|
|
|
|
|
- color: Color(0xFF272C33),
|
|
|
|
|
- shape: RoundedRectangleBorder(
|
|
|
|
|
- borderRadius: BorderRadius.circular(12.r),
|
|
|
|
|
|
|
+ Spacer(),
|
|
|
|
|
+ Container(
|
|
|
|
|
+ width: 144.w,
|
|
|
|
|
+ height: 142.h,
|
|
|
|
|
+ clipBehavior: Clip.hardEdge,
|
|
|
|
|
+ decoration: ShapeDecoration(
|
|
|
|
|
+ color: Color(0xFF272C33),
|
|
|
|
|
+ shape: RoundedRectangleBorder(
|
|
|
|
|
+ borderRadius: BorderRadius.circular(12.r),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Center(
|
|
|
|
|
+ child: image,
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
- child: Center(
|
|
|
|
|
- child: image,
|
|
|
|
|
- ),
|
|
|
|
|
- ),
|
|
|
|
|
- Spacer(),
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ Spacer(),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
Positioned(
|
|
Positioned(
|
|
@@ -874,7 +907,7 @@ class CleanUpButton extends StatelessWidget {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
class ImageContainer extends StatelessWidget {
|
|
class ImageContainer extends StatelessWidget {
|
|
|
- final Image image;
|
|
|
|
|
|
|
+ final Widget image;
|
|
|
final double size;
|
|
final double size;
|
|
|
|
|
|
|
|
const ImageContainer({
|
|
const ImageContainer({
|