Destiny 1 год назад
Родитель
Сommit
9011581cf8

+ 14 - 14
ios/Podfile

@@ -49,25 +49,25 @@ target.build_configurations.each do |config|
         '$(inherited)',
         '$(inherited)',
 
 
         ## dart: PermissionGroup.calendar
         ## dart: PermissionGroup.calendar
-        'PERMISSION_EVENTS=1',
+        #'PERMISSION_EVENTS=1',
         
         
         ## dart: PermissionGroup.calendarFullAccess
         ## dart: PermissionGroup.calendarFullAccess
-        'PERMISSION_EVENTS_FULL_ACCESS=1',
+        #'PERMISSION_EVENTS_FULL_ACCESS=1',
 
 
         ## dart: PermissionGroup.reminders
         ## dart: PermissionGroup.reminders
-        'PERMISSION_REMINDERS=1',
+        #'PERMISSION_REMINDERS=1',
 
 
         ## dart: PermissionGroup.contacts
         ## dart: PermissionGroup.contacts
-        'PERMISSION_CONTACTS=1',
+        #'PERMISSION_CONTACTS=1',
 
 
         ## dart: PermissionGroup.camera
         ## dart: PermissionGroup.camera
         'PERMISSION_CAMERA=1',
         'PERMISSION_CAMERA=1',
 
 
         ## dart: PermissionGroup.microphone
         ## dart: PermissionGroup.microphone
-        'PERMISSION_MICROPHONE=1',
+        #'PERMISSION_MICROPHONE=1',
 
 
         ## dart: PermissionGroup.speech
         ## dart: PermissionGroup.speech
-        'PERMISSION_SPEECH_RECOGNIZER=1',
+        #'PERMISSION_SPEECH_RECOGNIZER=1',
 
 
         ## dart: PermissionGroup.photos
         ## dart: PermissionGroup.photos
         'PERMISSION_PHOTOS=1',
         'PERMISSION_PHOTOS=1',
@@ -77,29 +77,29 @@ target.build_configurations.each do |config|
         ## macro.
         ## macro.
         ##
         ##
         ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
         ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
-        'PERMISSION_LOCATION=1',
-        'PERMISSION_LOCATION_WHENINUSE=0',
+        #'PERMISSION_LOCATION=1',
+        #'PERMISSION_LOCATION_WHENINUSE=0',
 
 
         ## dart: PermissionGroup.notification
         ## dart: PermissionGroup.notification
-        'PERMISSION_NOTIFICATIONS=1',
+        #'PERMISSION_NOTIFICATIONS=1',
 
 
         ## dart: PermissionGroup.mediaLibrary
         ## dart: PermissionGroup.mediaLibrary
-        'PERMISSION_MEDIA_LIBRARY=1',
+        #'PERMISSION_MEDIA_LIBRARY=1',
 
 
         ## dart: PermissionGroup.sensors
         ## dart: PermissionGroup.sensors
-        'PERMISSION_SENSORS=1',
+        #'PERMISSION_SENSORS=1',
 
 
         ## dart: PermissionGroup.bluetooth
         ## dart: PermissionGroup.bluetooth
-        'PERMISSION_BLUETOOTH=1',
+        #'PERMISSION_BLUETOOTH=1',
 
 
         ## dart: PermissionGroup.appTrackingTransparency
         ## dart: PermissionGroup.appTrackingTransparency
         'PERMISSION_APP_TRACKING_TRANSPARENCY=1',
         'PERMISSION_APP_TRACKING_TRANSPARENCY=1',
 
 
         ## dart: PermissionGroup.criticalAlerts
         ## dart: PermissionGroup.criticalAlerts
-        'PERMISSION_CRITICAL_ALERTS=1',
+        #'PERMISSION_CRITICAL_ALERTS=1',
 
 
         ## dart: PermissionGroup.criticalAlerts
         ## dart: PermissionGroup.criticalAlerts
-        'PERMISSION_ASSISTANT=1',
+        #'PERMISSION_ASSISTANT=1',
       ]
       ]
     end
     end
   end
   end

+ 1 - 1
ios/Podfile.lock

@@ -130,6 +130,6 @@ SPEC CHECKSUMS:
   video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
   video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
   webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4
   webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4
 
 
-PODFILE CHECKSUM: ad7614c9873991faf6165fbd46dcff66209d9783
+PODFILE CHECKSUM: 5a5209ae115459a6ee3f7221309da6047ec32ac5
 
 
 COCOAPODS: 1.16.2
 COCOAPODS: 1.16.2

+ 23 - 6
ios/Runner.xcodeproj/project.pbxproj

@@ -56,6 +56,7 @@
 		74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
 		74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
 		74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
 		7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
+		8AE9D00F2D3F4D3000CDFE29 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
 		9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
 		9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
 		9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
 		9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
 		97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -152,6 +153,7 @@
 		97C146F01CF9000F007C117D /* Runner */ = {
 		97C146F01CF9000F007C117D /* Runner */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				8AE9D00F2D3F4D3000CDFE29 /* Runner.entitlements */,
 				97C146FA1CF9000F007C117D /* Main.storyboard */,
 				97C146FA1CF9000F007C117D /* Main.storyboard */,
 				97C146FD1CF9000F007C117D /* Assets.xcassets */,
 				97C146FD1CF9000F007C117D /* Assets.xcassets */,
 				97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
 				97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
@@ -487,22 +489,27 @@
 			buildSettings = {
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
+				CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				CURRENT_PROJECT_VERSION = 3;
 				DEVELOPMENT_TEAM = 2KQK3K8899;
 				DEVELOPMENT_TEAM = 2KQK3K8899;
 				ENABLE_BITCODE = NO;
 				ENABLE_BITCODE = NO;
 				INFOPLIST_FILE = Runner/Info.plist;
 				INFOPLIST_FILE = Runner/Info.plist;
-				INFOPLIST_KEY_CFBundleDisplayName = Clean;
+				INFOPLIST_KEY_CFBundleDisplayName = "CleanPro: Photo Cleaner";
 				LD_RUNPATH_SEARCH_PATHS = (
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(inherited)",
 					"@executable_path/Frameworks",
 					"@executable_path/Frameworks",
 				);
 				);
+				MARKETING_VERSION = 1.0;
 				PRODUCT_BUNDLE_IDENTIFIER = com.cleanpro.tools;
 				PRODUCT_BUNDLE_IDENTIFIER = com.cleanpro.tools;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				PROVISIONING_PROFILE_SPECIFIER = "";
+				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
+				SUPPORTS_MACCATALYST = NO;
 				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
 				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
 				SWIFT_VERSION = 5.0;
 				SWIFT_VERSION = 5.0;
+				TARGETED_DEVICE_FAMILY = 1;
 				VERSIONING_SYSTEM = "apple-generic";
 				VERSIONING_SYSTEM = "apple-generic";
 			};
 			};
 			name = Profile;
 			name = Profile;
@@ -674,23 +681,28 @@
 			buildSettings = {
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
+				CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				CURRENT_PROJECT_VERSION = 3;
 				DEVELOPMENT_TEAM = 2KQK3K8899;
 				DEVELOPMENT_TEAM = 2KQK3K8899;
 				ENABLE_BITCODE = NO;
 				ENABLE_BITCODE = NO;
 				INFOPLIST_FILE = Runner/Info.plist;
 				INFOPLIST_FILE = Runner/Info.plist;
-				INFOPLIST_KEY_CFBundleDisplayName = Clean;
+				INFOPLIST_KEY_CFBundleDisplayName = "CleanPro: Photo Cleaner";
 				LD_RUNPATH_SEARCH_PATHS = (
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(inherited)",
 					"@executable_path/Frameworks",
 					"@executable_path/Frameworks",
 				);
 				);
+				MARKETING_VERSION = 1.0;
 				PRODUCT_BUNDLE_IDENTIFIER = com.cleanpro.tools;
 				PRODUCT_BUNDLE_IDENTIFIER = com.cleanpro.tools;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				PROVISIONING_PROFILE_SPECIFIER = "";
+				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
+				SUPPORTS_MACCATALYST = NO;
 				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
 				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 				SWIFT_VERSION = 5.0;
 				SWIFT_VERSION = 5.0;
+				TARGETED_DEVICE_FAMILY = 1;
 				VERSIONING_SYSTEM = "apple-generic";
 				VERSIONING_SYSTEM = "apple-generic";
 			};
 			};
 			name = Debug;
 			name = Debug;
@@ -701,22 +713,27 @@
 			buildSettings = {
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
+				CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				CURRENT_PROJECT_VERSION = 3;
 				DEVELOPMENT_TEAM = 2KQK3K8899;
 				DEVELOPMENT_TEAM = 2KQK3K8899;
 				ENABLE_BITCODE = NO;
 				ENABLE_BITCODE = NO;
 				INFOPLIST_FILE = Runner/Info.plist;
 				INFOPLIST_FILE = Runner/Info.plist;
-				INFOPLIST_KEY_CFBundleDisplayName = Clean;
+				INFOPLIST_KEY_CFBundleDisplayName = "CleanPro: Photo Cleaner";
 				LD_RUNPATH_SEARCH_PATHS = (
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(inherited)",
 					"@executable_path/Frameworks",
 					"@executable_path/Frameworks",
 				);
 				);
+				MARKETING_VERSION = 1.0;
 				PRODUCT_BUNDLE_IDENTIFIER = com.cleanpro.tools;
 				PRODUCT_BUNDLE_IDENTIFIER = com.cleanpro.tools;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				PROVISIONING_PROFILE_SPECIFIER = "";
+				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
+				SUPPORTS_MACCATALYST = NO;
 				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
 				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
 				SWIFT_VERSION = 5.0;
 				SWIFT_VERSION = 5.0;
+				TARGETED_DEVICE_FAMILY = 1;
 				VERSIONING_SYSTEM = "apple-generic";
 				VERSIONING_SYSTEM = "apple-generic";
 			};
 			};
 			name = Release;
 			name = Release;

+ 1 - 1
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

@@ -51,7 +51,7 @@
       </Testables>
       </Testables>
    </TestAction>
    </TestAction>
    <LaunchAction
    <LaunchAction
-      buildConfiguration = "Debug"
+      buildConfiguration = "Release"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       launchStyle = "0"
       launchStyle = "0"

+ 13 - 8
ios/Runner/Info.plist

@@ -2,8 +2,6 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <plist version="1.0">
 <dict>
 <dict>
-	<key>NSUserTrackingUsageDescription</key>
-	<string>本App需要使用追踪权限用于广告</string>
 	<key>CADisableMinimumFrameDurationOnPhone</key>
 	<key>CADisableMinimumFrameDurationOnPhone</key>
 	<true/>
 	<true/>
 	<key>CFBundleDevelopmentRegion</key>
 	<key>CFBundleDevelopmentRegion</key>
@@ -26,12 +24,21 @@
 	<string>????</string>
 	<string>????</string>
 	<key>CFBundleVersion</key>
 	<key>CFBundleVersion</key>
 	<string>$(FLUTTER_BUILD_NUMBER)</string>
 	<string>$(FLUTTER_BUILD_NUMBER)</string>
+	<key>ITSAppUsesNonExemptEncryption</key>
+	<false/>
 	<key>LSRequiresIPhoneOS</key>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
 	<true/>
+	<key>NSAppTransportSecurity</key>
+	<dict>
+		<key>NSAllowsArbitraryLoads</key>
+		<true/>
+	</dict>
 	<key>NSCameraUsageDescription</key>
 	<key>NSCameraUsageDescription</key>
-	<string>本App需要使用拍照权限用于获取照片</string>
+	<string>"CleanPro" would like to access your camera. The app will access and store the photos and videos you take.</string>
 	<key>NSPhotoLibraryUsageDescription</key>
 	<key>NSPhotoLibraryUsageDescription</key>
-	<string>本App需要使用相册权限用于获取照片</string>
+	<string>"CleanPro" would like to access your photo gallery to search for similar and duplicate photos. Access permission is required: Your photos will not be stored or used on any of our servers, nor will they be shared with third parties.</string>
+	<key>NSUserTrackingUsageDescription</key>
+	<string>Allow "CleanPro" to track your activities in other companies' apps and websites? This data will be used for analytics purposes. We do not collect your personal data. If you decline, tracking will not occur.</string>
 	<key>UIApplicationSupportsIndirectInputEvents</key>
 	<key>UIApplicationSupportsIndirectInputEvents</key>
 	<true/>
 	<true/>
 	<key>UILaunchStoryboardName</key>
 	<key>UILaunchStoryboardName</key>
@@ -41,15 +48,13 @@
 	<key>UISupportedInterfaceOrientations</key>
 	<key>UISupportedInterfaceOrientations</key>
 	<array>
 	<array>
 		<string>UIInterfaceOrientationPortrait</string>
 		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationLandscapeLeft</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
 	</array>
 	</array>
 	<key>UISupportedInterfaceOrientations~ipad</key>
 	<key>UISupportedInterfaceOrientations~ipad</key>
 	<array>
 	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationPortraitUpsideDown</string>
 		<string>UIInterfaceOrientationLandscapeLeft</string>
 		<string>UIInterfaceOrientationLandscapeLeft</string>
 		<string>UIInterfaceOrientationLandscapeRight</string>
 		<string>UIInterfaceOrientationLandscapeRight</string>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
 	</array>
 	</array>
 </dict>
 </dict>
 </plist>
 </plist>

+ 8 - 0
ios/Runner/Runner.entitlements

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>aps-environment</key>
+	<string>development</string>
+</dict>
+</plist>

+ 1 - 1
lib/data/api/atmob_api.dart

@@ -39,7 +39,7 @@ abstract class AtmobApi {
       @Body() OrderStatusRequest request);
       @Body() OrderStatusRequest request);
 
 
   @POST("/project/clean/v1/member/subscription/resume")
   @POST("/project/clean/v1/member/subscription/resume")
-  Future<BaseResponse<SubscriptionResumeResponse>> resume(
+  Future<BaseResponse> resume(
       @Body() SubscriptionResumeRequest request);
       @Body() SubscriptionResumeRequest request);
 
 
   @POST("/project/clean/v1/clean/wallpaper/list")
   @POST("/project/clean/v1/clean/wallpaper/list")

+ 0 - 3
lib/data/api/response/subscription_resume_response.dart

@@ -1,8 +1,5 @@
 import 'package:json_annotation/json_annotation.dart';
 import 'package:json_annotation/json_annotation.dart';
 
 
-import '../../bean/payment_way.dart';
-import '../../bean/store_item.dart';
-
 part 'subscription_resume_response.g.dart';
 part 'subscription_resume_response.g.dart';
 
 
 @JsonSerializable()
 @JsonSerializable()

+ 2 - 4
lib/data/repositories/store_repository.dart

@@ -15,13 +15,11 @@ class StoreRepository {
     return storeRepository;
     return storeRepository;
   }
   }
 
 
-  Future<int> resume(
+  Future<void> resume(
       int payPlatform, int payMethod, String receiptData) {
       int payPlatform, int payMethod, String receiptData) {
     return atmobApi
     return atmobApi
         .resume(SubscriptionResumeRequest(payPlatform, payMethod, receiptData))
         .resume(SubscriptionResumeRequest(payPlatform, payMethod, receiptData))
-        .then(HttpHandler.handle(false)).then((data) {
-      return data.code ?? 500;
-    });
+        .then(HttpHandler.handle(true));
   }
   }
 
 
   Future<StoreIndexResponse> storeIndex() {
   Future<StoreIndexResponse> storeIndex() {

+ 6 - 6
lib/dialog/privacy_dialog.dart

@@ -64,12 +64,12 @@ void privacyDialog({required Function onAgree, required Function onDisagree}) {
                             ),
                             ),
                           ),
                           ),
                         ),
                         ),
-                        SizedBox(
-                            child: Lottie.asset(
-                          Assets.anim.animPrivacy,
-                          height: 412.w,
-                          repeat: true,
-                        )),
+                        // SizedBox(
+                        //     child: Lottie.asset(
+                        //   Assets.anim.animPrivacy,
+                        //   height: 412.w,
+                        //   repeat: true,
+                        // )),
                         SizedBox(
                         SizedBox(
                           height: 8,
                           height: 8,
                         ),
                         ),

+ 29 - 29
lib/module/home/home_view.dart

@@ -5,6 +5,7 @@ import 'package:clean/module/home/home_controller.dart';
 import 'package:clean/module/image_picker/image_picker_util.dart';
 import 'package:clean/module/image_picker/image_picker_util.dart';
 import 'package:clean/resource/assets.gen.dart';
 import 'package:clean/resource/assets.gen.dart';
 import 'package:clean/resource/string.gen.dart';
 import 'package:clean/resource/string.gen.dart';
+import 'package:clean/router/app_pages.dart';
 import 'package:clean/utils/image_util.dart';
 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';
@@ -71,9 +72,7 @@ class HomePage extends BaseView<HomeController> {
           ),
           ),
           GestureDetector(
           GestureDetector(
             onTap: () {
             onTap: () {
-              print("home vip");
-              controller.usedSpace.value = controller.usedSpace.value + 60;
-              controller.freeSpace.value = controller.freeSpace.value - 60;
+              Get.toNamed(RoutePath.store);
             },
             },
             child: Assets.images.iconHomeTitleVip
             child: Assets.images.iconHomeTitleVip
                 .image(width: 60.8.w, height: 20.h),
                 .image(width: 60.8.w, height: 20.h),
@@ -446,21 +445,21 @@ class HomePage extends BaseView<HomeController> {
               mainAxisAlignment: MainAxisAlignment.spaceBetween,
               mainAxisAlignment: MainAxisAlignment.spaceBetween,
               children: List.generate(4, (index) {
               children: List.generate(4, (index) {
                 var image = Assets.images.iconHomeNoPhoto.image(
                 var image = Assets.images.iconHomeNoPhoto.image(
-                  width: 146.w * 0.45,
-                  height: 146.w * 0.45,
+                  width: 70.w * 0.45,
+                  height: 70.w * 0.45,
                 );
                 );
                 if (controller.similarPhotos.length > index) {
                 if (controller.similarPhotos.length > index) {
                   image = AssetEntityImage(
                   image = AssetEntityImage(
-                      width: 146.w,
-                      height: 146.w,
+                      width: 70.w,
+                      height: 70.w,
                       controller.similarPhotos[index],
                       controller.similarPhotos[index],
                       isOriginal: false,
                       isOriginal: false,
                       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(
                         return Assets.images.iconHomeNoPhoto.image(
-                          width: 146.w * 0.45,
-                          height: 146.w * 0.45,
+                          width: 70.w * 0.45,
+                          height: 70.w * 0.45,
                         );
                         );
                       });
                       });
                 }
                 }
@@ -539,26 +538,28 @@ class HomePage extends BaseView<HomeController> {
                 return Row(
                 return Row(
                   mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                   mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                   children: List.generate(2, (index) {
                   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(
+                              width: 146.w * 0.45,
+                              height: 146.w * 0.45,
+                            );
+                          });
+                    }
                     return ImageContainer(
                     return ImageContainer(
-                      image: controller.peoplePhotos.length < 2
-                          ? Assets.images.iconHomeNoPhoto.image(
-                        width: 146.w * 0.45,
-                        height: 146.w * 0.45,
-                      )
-                          : 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,
-                          );
-                        },
-                      ),
+                      image: image,
+                      size: 146.w,
                       // Image.file(
                       // Image.file(
                       //   width: 146.w,
                       //   width: 146.w,
                       //   height: 146.w,
                       //   height: 146.w,
@@ -566,7 +567,6 @@ class HomePage extends BaseView<HomeController> {
                       //   fit: BoxFit.cover,
                       //   fit: BoxFit.cover,
                       // ),
                       // ),
                       // 可以传入不同的路径
                       // 可以传入不同的路径
-                      size: 146.w,
                     );
                     );
                   }),
                   }),
                 );
                 );

+ 17 - 5
lib/module/store/store_controller.dart

@@ -30,11 +30,13 @@ class StoreController extends BaseController implements PaymentStatusCallback {
 
 
   final Rxn<PaymentWay> currentSelectedPaymentWay = Rxn<PaymentWay>();
   final Rxn<PaymentWay> currentSelectedPaymentWay = Rxn<PaymentWay>();
 
 
+  RxBool isUseFree = false.obs;
+
   @override
   @override
   Future<void> onInit() async {
   Future<void> onInit() async {
 
 
     initStoreIndexData();
     initStoreIndexData();
-    print(await ClassifyPhoto().checkTrialEligibility());
+    isUseFree.value = await ClassifyPhoto().checkTrialEligibility();
 
 
     ApplePay().check();
     ApplePay().check();
   }
   }
@@ -177,16 +179,26 @@ class StoreController extends BaseController implements PaymentStatusCallback {
     }
     }
     int payPlatform = paymentWay.payPlatform;
     int payPlatform = paymentWay.payPlatform;
     int payMethod = paymentWay.payMethod;
     int payMethod = paymentWay.payMethod;
-    var code = await storeRepository.resume(payPlatform, payMethod, receiptData);
-    if (code == 0) {
+    // var code = await storeRepository.resume(payPlatform, payMethod, receiptData);
+    storeRepository.resume(payPlatform, payMethod, receiptData).then((data) {
       LoadingDialog.hide();
       LoadingDialog.hide();
       ToastUtil.show("Restore success");
       ToastUtil.show("Restore success");
       userRepository.getUserInfo();
       userRepository.getUserInfo();
       Get.back();
       Get.back();
-    } else {
+    }).catchError((error) {
       LoadingDialog.hide();
       LoadingDialog.hide();
       ToastUtil.show("Restore fail");
       ToastUtil.show("Restore fail");
-    }
+    });
+
+    // if (code == 0) {
+    //   LoadingDialog.hide();
+    //   ToastUtil.show("Restore success");
+    //   userRepository.getUserInfo();
+    //   Get.back();
+    // } else {
+    //   LoadingDialog.hide();
+    //   ToastUtil.show("Restore fail");
+    // }
   }
   }
 
 
   void checkPaymentStatus(
   void checkPaymentStatus(

+ 10 - 3
lib/module/store/store_view.dart

@@ -1,5 +1,6 @@
 import 'package:clean/base/base_page.dart';
 import 'package:clean/base/base_page.dart';
 import 'package:clean/data/bean/store_item.dart';
 import 'package:clean/data/bean/store_item.dart';
+import 'package:clean/module/browser/browser_view.dart';
 import 'package:clean/module/store/store_controller.dart';
 import 'package:clean/module/store/store_controller.dart';
 import 'package:clean/utils/expand.dart';
 import 'package:clean/utils/expand.dart';
 import 'package:flutter/Material.dart';
 import 'package:flutter/Material.dart';
@@ -7,6 +8,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
 import 'package:get/get.dart';
 import 'package:get/get.dart';
 import 'package:intl/intl.dart';
 import 'package:intl/intl.dart';
 
 
+import '../../data/consts/constants.dart';
 import '../../resource/assets.gen.dart';
 import '../../resource/assets.gen.dart';
 
 
 class StorePage extends BasePage<StoreController> {
 class StorePage extends BasePage<StoreController> {
@@ -211,6 +213,9 @@ class StorePage extends BasePage<StoreController> {
                   mainAxisAlignment: MainAxisAlignment.center,
                   mainAxisAlignment: MainAxisAlignment.center,
                   children: [
                   children: [
                     GestureDetector(
                     GestureDetector(
+                      onTap: () {
+                        BrowserPage.start(Constants.privacyPolicy);
+                      },
                       child: Text(
                       child: Text(
                         'Privacy Policy',
                         'Privacy Policy',
                         style: TextStyle(
                         style: TextStyle(
@@ -218,7 +223,6 @@ class StorePage extends BasePage<StoreController> {
                           fontSize: 12.sp,
                           fontSize: 12.sp,
                         ),
                         ),
                       ),
                       ),
-                      onTap: () {},
                     ),
                     ),
                     Text(
                     Text(
                       ' | ',
                       ' | ',
@@ -228,6 +232,9 @@ class StorePage extends BasePage<StoreController> {
                       ),
                       ),
                     ),
                     ),
                     GestureDetector(
                     GestureDetector(
+                      onTap: () {
+                        BrowserPage.start(Constants.userAgreement);
+                      },
                       child: Text(
                       child: Text(
                         'User Agreement',
                         'User Agreement',
                         style: TextStyle(
                         style: TextStyle(
@@ -235,7 +242,6 @@ class StorePage extends BasePage<StoreController> {
                           fontSize: 12.sp,
                           fontSize: 12.sp,
                         ),
                         ),
                       ),
                       ),
-                      onTap: () {},
                     ),
                     ),
                   ],
                   ],
                 ),
                 ),
@@ -280,7 +286,8 @@ class StorePage extends BasePage<StoreController> {
 
 
     var content = "{totalPrice}, only {dailyPrice} per day";
     var content = "{totalPrice}, only {dailyPrice} per day";
     content = content.replaceAll("{totalPrice}", "\$${item.amount / 100}");
     content = content.replaceAll("{totalPrice}", "\$${item.amount / 100}");
-    content = content.replaceAll("{dailyPrice}", "\$${(item.amount / 100 / item.coefficient).toStringAsFixed(2)}");
+    content = content.replaceAll("{dailyPrice}",
+        "\$${(item.amount / 100 / item.coefficient).toStringAsFixed(2)}");
     return Obx(() {
     return Obx(() {
       return Container(
       return Container(
         height: 80.h,
         height: 80.h,

+ 106 - 2
pubspec.lock

@@ -141,6 +141,30 @@ packages:
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
     version: "8.9.3"
     version: "8.9.3"
+  cached_network_image:
+    dependency: "direct main"
+    description:
+      name: cached_network_image
+      sha256: "7c1183e361e5c8b0a0f21a28401eecdbde252441106a9816400dd4c2b2424916"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "3.4.1"
+  cached_network_image_platform_interface:
+    dependency: transitive
+    description:
+      name: cached_network_image_platform_interface
+      sha256: "35814b016e37fbdc91f7ae18c8caf49ba5c88501813f73ce8a07027a395e2829"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "4.1.1"
+  cached_network_image_web:
+    dependency: transitive
+    description:
+      name: cached_network_image_web
+      sha256: "980842f4e8e2535b8dbd3d5ca0b1f0ba66bf61d14cc3a17a9b4788a3685ba062"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "1.3.1"
   camera:
   camera:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -409,6 +433,14 @@ packages:
     description: flutter
     description: flutter
     source: sdk
     source: sdk
     version: "0.0.0"
     version: "0.0.0"
+  flutter_cache_manager:
+    dependency: "direct main"
+    description:
+      name: flutter_cache_manager
+      sha256: "400b6592f16a4409a7f2bb929a9a7e38c72cceb8ffb99ee57bbf2cb2cecf8386"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "3.4.1"
   flutter_card_swiper:
   flutter_card_swiper:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -560,6 +592,14 @@ packages:
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
     version: "4.1.2"
     version: "4.1.2"
+  image_gallery_saver:
+    dependency: "direct main"
+    description:
+      name: image_gallery_saver
+      sha256: "0aba74216a4d9b0561510cb968015d56b701ba1bd94aace26aacdd8ae5761816"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "2.0.3"
   image_size_getter:
   image_size_getter:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -776,6 +816,14 @@ packages:
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
     version: "1.0.0"
     version: "1.0.0"
+  octo_image:
+    dependency: transitive
+    description:
+      name: octo_image
+      sha256: "34faa6639a78c7e3cbe79be6f9f96535867e879748ade7d17c9b1ae7536293bd"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "2.1.0"
   package_config:
   package_config:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1032,6 +1080,14 @@ packages:
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
     version: "9.1.7"
     version: "9.1.7"
+  rxdart:
+    dependency: transitive
+    description:
+      name: rxdart
+      sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "0.28.0"
   sensors_plus:
   sensors_plus:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1101,6 +1157,46 @@ packages:
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
     version: "7.0.0"
     version: "7.0.0"
+  sqflite:
+    dependency: transitive
+    description:
+      name: sqflite
+      sha256: "2d7299468485dca85efeeadf5d38986909c5eb0cd71fd3db2c2f000e6c9454bb"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "2.4.1"
+  sqflite_android:
+    dependency: transitive
+    description:
+      name: sqflite_android
+      sha256: "78f489aab276260cdd26676d2169446c7ecd3484bbd5fead4ca14f3ed4dd9ee3"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "2.4.0"
+  sqflite_common:
+    dependency: transitive
+    description:
+      name: sqflite_common
+      sha256: "761b9740ecbd4d3e66b8916d784e581861fd3c3553eda85e167bc49fdb68f709"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "2.5.4+6"
+  sqflite_darwin:
+    dependency: transitive
+    description:
+      name: sqflite_darwin
+      sha256: "22adfd9a2c7d634041e96d6241e6e1c8138ca6817018afc5d443fef91dcefa9c"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "2.4.1+1"
+  sqflite_platform_interface:
+    dependency: transitive
+    description:
+      name: sqflite_platform_interface
+      sha256: "8dd4515c7bdcae0a785b0062859336de775e8c65db81ae33dd5445f35be61920"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "2.4.0"
   stack_trace:
   stack_trace:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1197,6 +1293,14 @@ packages:
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
     version: "1.4.0"
     version: "1.4.0"
+  uuid:
+    dependency: transitive
+    description:
+      name: uuid
+      sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "4.5.1"
   vector_graphics_codec:
   vector_graphics_codec:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1289,10 +1393,10 @@ packages:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: web
       name: web
-      sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
+      sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.5.1"
+    version: "1.1.0"
   web_socket:
   web_socket:
     dependency: transitive
     dependency: transitive
     description:
     description:

+ 1 - 1
pubspec.yaml

@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
 # In Windows, build-name is used as the major, minor, and patch parts
 # In Windows, build-name is used as the major, minor, and patch parts
 # of the product and file versions while build-number is used as the build suffix.
 # of the product and file versions while build-number is used as the build suffix.
-version: 1.0.0+1
+version: 1.0.0+8
 
 
 environment:
 environment:
   sdk: ^3.6.0
   sdk: ^3.6.0