|
|
@@ -4,6 +4,7 @@ import 'package:clean/base/base_page.dart';
|
|
|
import 'package:clean/module/image_picker/image_picker_util.dart';
|
|
|
import 'package:clean/module/photo_info/photo_info_controller.dart';
|
|
|
import 'package:clean/utils/expand.dart';
|
|
|
+import 'package:clean/utils/file_utils.dart';
|
|
|
import 'package:flutter/Material.dart';
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
import 'package:get/get.dart';
|
|
|
@@ -66,208 +67,211 @@ class PhotoInfoPage extends BasePage<PhotoInfoController> {
|
|
|
_buildImageCarousel(),
|
|
|
],
|
|
|
),
|
|
|
- Positioned(
|
|
|
- left: 0,
|
|
|
- right: 0,
|
|
|
- bottom: 0,
|
|
|
- child: Column(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
- children: [
|
|
|
- Container(
|
|
|
- margin: EdgeInsets.only(left: 18.w),
|
|
|
- child: Obx(() {
|
|
|
- return Column(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
- children: [
|
|
|
- Text(
|
|
|
- "Analysis Results",
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.white,
|
|
|
- fontWeight: FontWeight.w900,
|
|
|
- fontSize: 16.sp,
|
|
|
+ Visibility(
|
|
|
+ visible: controller.type.value == FileType.analysis,
|
|
|
+ child: Positioned(
|
|
|
+ left: 0,
|
|
|
+ right: 0,
|
|
|
+ bottom: 0,
|
|
|
+ child: Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ Container(
|
|
|
+ margin: EdgeInsets.only(left: 18.w),
|
|
|
+ child: Obx(() {
|
|
|
+ return Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ Text(
|
|
|
+ "Analysis Results",
|
|
|
+ style: TextStyle(
|
|
|
+ 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(
|
|
|
- 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(
|
|
|
+ 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(
|
|
|
- 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(
|
|
|
+ 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(
|
|
|
- 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(
|
|
|
+ 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(
|
|
|
- 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(
|
|
|
+ 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(
|
|
|
- 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(
|
|
|
+ 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(
|
|
|
- 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(
|
|
|
+ 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(
|
|
|
+ color: Colors.white,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ fontSize: 13.sp,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ SizedBox(height: 32.h,),
|
|
|
+ ],
|
|
|
+ );
|
|
|
+ }),
|
|
|
+ ),
|
|
|
+ Center(
|
|
|
+ child: GestureDetector(
|
|
|
+ onTap: () {
|
|
|
+ controller.deleteBtnClick(
|
|
|
+ controller.imageList[
|
|
|
+ controller.currentImageIndex.value],
|
|
|
+ controller.currentImageIndex.value);
|
|
|
+ },
|
|
|
+ child: Container(
|
|
|
+ width: 328.w,
|
|
|
+ height: 48.h,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: "#0279FB".color,
|
|
|
+ borderRadius: BorderRadius.all(
|
|
|
+ Radius.circular(10.r),
|
|
|
),
|
|
|
),
|
|
|
- Visibility(
|
|
|
- visible: controller.address.value.isNotEmpty,
|
|
|
- child: Column(
|
|
|
+ child: Center(
|
|
|
+ child: Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
children: [
|
|
|
+ Assets.images.iconPrivacyPhotoDelete
|
|
|
+ .image(width: 18.w, height: 18.h),
|
|
|
SizedBox(
|
|
|
- height: 12.h,
|
|
|
- ),
|
|
|
- Text(
|
|
|
- controller.address.value,
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.white,
|
|
|
- fontWeight: FontWeight.w500,
|
|
|
- fontSize: 13.sp,
|
|
|
- ),
|
|
|
+ width: 5.w,
|
|
|
),
|
|
|
+ Obx(() {
|
|
|
+ if (controller.imageList.isEmpty) {
|
|
|
+ return SizedBox.shrink();
|
|
|
+ }
|
|
|
+ return Text(
|
|
|
+ controller.formatFileSize(controller
|
|
|
+ .imageList[controller
|
|
|
+ .currentImageIndex.value]
|
|
|
+ .size ??
|
|
|
+ 0),
|
|
|
+ style: TextStyle(
|
|
|
+ color: Colors.white,
|
|
|
+ fontSize: 16.sp,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }),
|
|
|
],
|
|
|
),
|
|
|
),
|
|
|
- SizedBox(height: 32.h,),
|
|
|
- ],
|
|
|
- );
|
|
|
- }),
|
|
|
- ),
|
|
|
- Center(
|
|
|
- child: GestureDetector(
|
|
|
- onTap: () {
|
|
|
- controller.deleteBtnClick(
|
|
|
- controller.imageList[
|
|
|
- controller.currentImageIndex.value],
|
|
|
- controller.currentImageIndex.value);
|
|
|
- },
|
|
|
- child: Container(
|
|
|
- width: 328.w,
|
|
|
- height: 48.h,
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: "#0279FB".color,
|
|
|
- borderRadius: BorderRadius.all(
|
|
|
- Radius.circular(10.r),
|
|
|
- ),
|
|
|
- ),
|
|
|
- child: Center(
|
|
|
- child: Row(
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
- children: [
|
|
|
- Assets.images.iconPrivacyPhotoDelete
|
|
|
- .image(width: 18.w, height: 18.h),
|
|
|
- SizedBox(
|
|
|
- width: 5.w,
|
|
|
- ),
|
|
|
- Obx(() {
|
|
|
- if (controller.imageList.isEmpty) {
|
|
|
- return SizedBox.shrink();
|
|
|
- }
|
|
|
- return Text(
|
|
|
- controller.formatFileSize(controller
|
|
|
- .imageList[controller
|
|
|
- .currentImageIndex.value]
|
|
|
- .size ??
|
|
|
- 0),
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.white,
|
|
|
- fontSize: 16.sp,
|
|
|
- fontWeight: FontWeight.w500,
|
|
|
- ),
|
|
|
- );
|
|
|
- }),
|
|
|
- ],
|
|
|
- ),
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
- ),
|
|
|
- ],
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
],
|