| @@ -9,7 +9,7 @@ | |||||
| <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | ||||
| <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" | ||||
| android:maxSdkVersion="28" /> | android:maxSdkVersion="28" /> | ||||
| <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" /> | |||||
| <!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />--> | |||||
| <application | <application | ||||
| android:name="${applicationName}" | android:name="${applicationName}" | ||||
| android:label="assetstock" | android:label="assetstock" | ||||
| @@ -21,6 +21,6 @@ | |||||
| <key>CFBundleVersion</key> | <key>CFBundleVersion</key> | ||||
| <string>1.0</string> | <string>1.0</string> | ||||
| <key>MinimumOSVersion</key> | <key>MinimumOSVersion</key> | ||||
| <string>8.0</string> | |||||
| <string>11.0</string> | |||||
| </dict> | </dict> | ||||
| </plist> | </plist> | ||||
| @@ -1,5 +1,5 @@ | |||||
| # Uncomment this line to define a global platform for your project | # Uncomment this line to define a global platform for your project | ||||
| # platform :ios, '9.0' | |||||
| # platform :ios, '11.0' | |||||
| # CocoaPods analytics sends network stats synchronously affecting flutter build latency. | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. | ||||
| ENV['COCOAPODS_DISABLE_STATS'] = 'true' | ENV['COCOAPODS_DISABLE_STATS'] = 'true' | ||||
| @@ -3,13 +3,14 @@ | |||||
| archiveVersion = 1; | archiveVersion = 1; | ||||
| classes = { | classes = { | ||||
| }; | }; | ||||
| objectVersion = 46; | |||||
| objectVersion = 50; | |||||
| objects = { | objects = { | ||||
| /* Begin PBXBuildFile section */ | /* Begin PBXBuildFile section */ | ||||
| 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; | ||||
| 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; | ||||
| 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; | ||||
| 7F97140DDC9766C8BCC9DB1F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB5A9940CDB629A1BBA2BC51 /* Pods_Runner.framework */; }; | |||||
| 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; | ||||
| 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; | ||||
| 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; | ||||
| @@ -31,10 +32,12 @@ | |||||
| /* Begin PBXFileReference section */ | /* Begin PBXFileReference section */ | ||||
| 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; | ||||
| 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; | ||||
| 1ADB1407455DE034E10C911C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; }; | |||||
| 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; | ||||
| 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>"; }; | ||||
| 88873868416AD783785E81C7 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; 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; }; | ||||
| @@ -42,6 +45,8 @@ | |||||
| 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; | ||||
| 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; | ||||
| 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | ||||
| B25627757AF10282201C5B03 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; }; | |||||
| FB5A9940CDB629A1BBA2BC51 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | |||||
| /* End PBXFileReference section */ | /* End PBXFileReference section */ | ||||
| /* Begin PBXFrameworksBuildPhase section */ | /* Begin PBXFrameworksBuildPhase section */ | ||||
| @@ -49,6 +54,7 @@ | |||||
| isa = PBXFrameworksBuildPhase; | isa = PBXFrameworksBuildPhase; | ||||
| buildActionMask = 2147483647; | buildActionMask = 2147483647; | ||||
| files = ( | files = ( | ||||
| 7F97140DDC9766C8BCC9DB1F /* Pods_Runner.framework in Frameworks */, | |||||
| ); | ); | ||||
| runOnlyForDeploymentPostprocessing = 0; | runOnlyForDeploymentPostprocessing = 0; | ||||
| }; | }; | ||||
| @@ -72,6 +78,8 @@ | |||||
| 9740EEB11CF90186004384FC /* Flutter */, | 9740EEB11CF90186004384FC /* Flutter */, | ||||
| 97C146F01CF9000F007C117D /* Runner */, | 97C146F01CF9000F007C117D /* Runner */, | ||||
| 97C146EF1CF9000F007C117D /* Products */, | 97C146EF1CF9000F007C117D /* Products */, | ||||
| E778508E83C915897E28B2CA /* Pods */, | |||||
| BF2BAC820406AD7785E66AA3 /* Frameworks */, | |||||
| ); | ); | ||||
| sourceTree = "<group>"; | sourceTree = "<group>"; | ||||
| }; | }; | ||||
| @@ -106,6 +114,25 @@ | |||||
| name = "Supporting Files"; | name = "Supporting Files"; | ||||
| sourceTree = "<group>"; | sourceTree = "<group>"; | ||||
| }; | }; | ||||
| BF2BAC820406AD7785E66AA3 /* Frameworks */ = { | |||||
| isa = PBXGroup; | |||||
| children = ( | |||||
| FB5A9940CDB629A1BBA2BC51 /* Pods_Runner.framework */, | |||||
| ); | |||||
| name = Frameworks; | |||||
| sourceTree = "<group>"; | |||||
| }; | |||||
| E778508E83C915897E28B2CA /* Pods */ = { | |||||
| isa = PBXGroup; | |||||
| children = ( | |||||
| B25627757AF10282201C5B03 /* Pods-Runner.debug.xcconfig */, | |||||
| 88873868416AD783785E81C7 /* Pods-Runner.release.xcconfig */, | |||||
| 1ADB1407455DE034E10C911C /* Pods-Runner.profile.xcconfig */, | |||||
| ); | |||||
| name = Pods; | |||||
| path = Pods; | |||||
| sourceTree = "<group>"; | |||||
| }; | |||||
| /* End PBXGroup section */ | /* End PBXGroup section */ | ||||
| /* Begin PBXNativeTarget section */ | /* Begin PBXNativeTarget section */ | ||||
| @@ -113,12 +140,14 @@ | |||||
| isa = PBXNativeTarget; | isa = PBXNativeTarget; | ||||
| buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; | ||||
| buildPhases = ( | buildPhases = ( | ||||
| 161D032BEF51F13F0F798179 /* [CP] Check Pods Manifest.lock */, | |||||
| 9740EEB61CF901F6004384FC /* Run Script */, | 9740EEB61CF901F6004384FC /* Run Script */, | ||||
| 97C146EA1CF9000F007C117D /* Sources */, | 97C146EA1CF9000F007C117D /* Sources */, | ||||
| 97C146EB1CF9000F007C117D /* Frameworks */, | 97C146EB1CF9000F007C117D /* Frameworks */, | ||||
| 97C146EC1CF9000F007C117D /* Resources */, | 97C146EC1CF9000F007C117D /* Resources */, | ||||
| 9705A1C41CF9048500538489 /* Embed Frameworks */, | 9705A1C41CF9048500538489 /* Embed Frameworks */, | ||||
| 3B06AD1E1E4923F5004D2608 /* Thin Binary */, | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, | ||||
| B9FAECD78F48C1C5410BD713 /* [CP] Embed Pods Frameworks */, | |||||
| ); | ); | ||||
| buildRules = ( | buildRules = ( | ||||
| ); | ); | ||||
| @@ -135,7 +164,7 @@ | |||||
| 97C146E61CF9000F007C117D /* Project object */ = { | 97C146E61CF9000F007C117D /* Project object */ = { | ||||
| isa = PBXProject; | isa = PBXProject; | ||||
| attributes = { | attributes = { | ||||
| LastUpgradeCheck = 1020; | |||||
| LastUpgradeCheck = 1300; | |||||
| ORGANIZATIONNAME = ""; | ORGANIZATIONNAME = ""; | ||||
| TargetAttributes = { | TargetAttributes = { | ||||
| 97C146ED1CF9000F007C117D = { | 97C146ED1CF9000F007C117D = { | ||||
| @@ -177,6 +206,28 @@ | |||||
| /* End PBXResourcesBuildPhase section */ | /* End PBXResourcesBuildPhase section */ | ||||
| /* Begin PBXShellScriptBuildPhase section */ | /* Begin PBXShellScriptBuildPhase section */ | ||||
| 161D032BEF51F13F0F798179 /* [CP] Check Pods Manifest.lock */ = { | |||||
| isa = PBXShellScriptBuildPhase; | |||||
| buildActionMask = 2147483647; | |||||
| files = ( | |||||
| ); | |||||
| inputFileListPaths = ( | |||||
| ); | |||||
| inputPaths = ( | |||||
| "${PODS_PODFILE_DIR_PATH}/Podfile.lock", | |||||
| "${PODS_ROOT}/Manifest.lock", | |||||
| ); | |||||
| name = "[CP] Check Pods Manifest.lock"; | |||||
| outputFileListPaths = ( | |||||
| ); | |||||
| outputPaths = ( | |||||
| "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", | |||||
| ); | |||||
| runOnlyForDeploymentPostprocessing = 0; | |||||
| shellPath = /bin/sh; | |||||
| shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; | |||||
| showEnvVarsInLog = 0; | |||||
| }; | |||||
| 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { | ||||
| isa = PBXShellScriptBuildPhase; | isa = PBXShellScriptBuildPhase; | ||||
| buildActionMask = 2147483647; | buildActionMask = 2147483647; | ||||
| @@ -205,6 +256,23 @@ | |||||
| shellPath = /bin/sh; | shellPath = /bin/sh; | ||||
| shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; | ||||
| }; | }; | ||||
| B9FAECD78F48C1C5410BD713 /* [CP] Embed Pods Frameworks */ = { | |||||
| isa = PBXShellScriptBuildPhase; | |||||
| buildActionMask = 2147483647; | |||||
| files = ( | |||||
| ); | |||||
| inputFileListPaths = ( | |||||
| "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", | |||||
| ); | |||||
| name = "[CP] Embed Pods Frameworks"; | |||||
| outputFileListPaths = ( | |||||
| "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", | |||||
| ); | |||||
| runOnlyForDeploymentPostprocessing = 0; | |||||
| shellPath = /bin/sh; | |||||
| shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; | |||||
| showEnvVarsInLog = 0; | |||||
| }; | |||||
| /* End PBXShellScriptBuildPhase section */ | /* End PBXShellScriptBuildPhase section */ | ||||
| /* Begin PBXSourcesBuildPhase section */ | /* Begin PBXSourcesBuildPhase section */ | ||||
| @@ -241,7 +309,6 @@ | |||||
| /* Begin XCBuildConfiguration section */ | /* Begin XCBuildConfiguration section */ | ||||
| 249021D3217E4FDB00AE95B9 /* Profile */ = { | 249021D3217E4FDB00AE95B9 /* Profile */ = { | ||||
| isa = XCBuildConfiguration; | isa = XCBuildConfiguration; | ||||
| baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | |||||
| buildSettings = { | buildSettings = { | ||||
| ALWAYS_SEARCH_USER_PATHS = NO; | ALWAYS_SEARCH_USER_PATHS = NO; | ||||
| CLANG_ANALYZER_NONNULL = YES; | CLANG_ANALYZER_NONNULL = YES; | ||||
| @@ -281,7 +348,7 @@ | |||||
| GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||||
| GCC_WARN_UNUSED_FUNCTION = YES; | GCC_WARN_UNUSED_FUNCTION = YES; | ||||
| GCC_WARN_UNUSED_VARIABLE = YES; | GCC_WARN_UNUSED_VARIABLE = YES; | ||||
| IPHONEOS_DEPLOYMENT_TARGET = 8.0; | |||||
| IPHONEOS_DEPLOYMENT_TARGET = 11.0; | |||||
| MTL_ENABLE_DEBUG_INFO = NO; | MTL_ENABLE_DEBUG_INFO = NO; | ||||
| SDKROOT = iphoneos; | SDKROOT = iphoneos; | ||||
| SUPPORTED_PLATFORMS = iphoneos; | SUPPORTED_PLATFORMS = iphoneos; | ||||
| @@ -303,7 +370,10 @@ | |||||
| "$(PROJECT_DIR)/Flutter", | "$(PROJECT_DIR)/Flutter", | ||||
| ); | ); | ||||
| INFOPLIST_FILE = Runner/Info.plist; | INFOPLIST_FILE = Runner/Info.plist; | ||||
| LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | |||||
| LD_RUNPATH_SEARCH_PATHS = ( | |||||
| "$(inherited)", | |||||
| "@executable_path/Frameworks", | |||||
| ); | |||||
| LIBRARY_SEARCH_PATHS = ( | LIBRARY_SEARCH_PATHS = ( | ||||
| "$(inherited)", | "$(inherited)", | ||||
| "$(PROJECT_DIR)/Flutter", | "$(PROJECT_DIR)/Flutter", | ||||
| @@ -318,7 +388,6 @@ | |||||
| }; | }; | ||||
| 97C147031CF9000F007C117D /* Debug */ = { | 97C147031CF9000F007C117D /* Debug */ = { | ||||
| isa = XCBuildConfiguration; | isa = XCBuildConfiguration; | ||||
| baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; | |||||
| buildSettings = { | buildSettings = { | ||||
| ALWAYS_SEARCH_USER_PATHS = NO; | ALWAYS_SEARCH_USER_PATHS = NO; | ||||
| CLANG_ANALYZER_NONNULL = YES; | CLANG_ANALYZER_NONNULL = YES; | ||||
| @@ -364,7 +433,7 @@ | |||||
| GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||||
| GCC_WARN_UNUSED_FUNCTION = YES; | GCC_WARN_UNUSED_FUNCTION = YES; | ||||
| GCC_WARN_UNUSED_VARIABLE = YES; | GCC_WARN_UNUSED_VARIABLE = YES; | ||||
| IPHONEOS_DEPLOYMENT_TARGET = 8.0; | |||||
| IPHONEOS_DEPLOYMENT_TARGET = 11.0; | |||||
| MTL_ENABLE_DEBUG_INFO = YES; | MTL_ENABLE_DEBUG_INFO = YES; | ||||
| ONLY_ACTIVE_ARCH = YES; | ONLY_ACTIVE_ARCH = YES; | ||||
| SDKROOT = iphoneos; | SDKROOT = iphoneos; | ||||
| @@ -374,7 +443,6 @@ | |||||
| }; | }; | ||||
| 97C147041CF9000F007C117D /* Release */ = { | 97C147041CF9000F007C117D /* Release */ = { | ||||
| isa = XCBuildConfiguration; | isa = XCBuildConfiguration; | ||||
| baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | |||||
| buildSettings = { | buildSettings = { | ||||
| ALWAYS_SEARCH_USER_PATHS = NO; | ALWAYS_SEARCH_USER_PATHS = NO; | ||||
| CLANG_ANALYZER_NONNULL = YES; | CLANG_ANALYZER_NONNULL = YES; | ||||
| @@ -414,7 +482,7 @@ | |||||
| GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||||
| GCC_WARN_UNUSED_FUNCTION = YES; | GCC_WARN_UNUSED_FUNCTION = YES; | ||||
| GCC_WARN_UNUSED_VARIABLE = YES; | GCC_WARN_UNUSED_VARIABLE = YES; | ||||
| IPHONEOS_DEPLOYMENT_TARGET = 8.0; | |||||
| IPHONEOS_DEPLOYMENT_TARGET = 11.0; | |||||
| MTL_ENABLE_DEBUG_INFO = NO; | MTL_ENABLE_DEBUG_INFO = NO; | ||||
| SDKROOT = iphoneos; | SDKROOT = iphoneos; | ||||
| SUPPORTED_PLATFORMS = iphoneos; | SUPPORTED_PLATFORMS = iphoneos; | ||||
| @@ -437,7 +505,10 @@ | |||||
| "$(PROJECT_DIR)/Flutter", | "$(PROJECT_DIR)/Flutter", | ||||
| ); | ); | ||||
| INFOPLIST_FILE = Runner/Info.plist; | INFOPLIST_FILE = Runner/Info.plist; | ||||
| LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | |||||
| LD_RUNPATH_SEARCH_PATHS = ( | |||||
| "$(inherited)", | |||||
| "@executable_path/Frameworks", | |||||
| ); | |||||
| LIBRARY_SEARCH_PATHS = ( | LIBRARY_SEARCH_PATHS = ( | ||||
| "$(inherited)", | "$(inherited)", | ||||
| "$(PROJECT_DIR)/Flutter", | "$(PROJECT_DIR)/Flutter", | ||||
| @@ -464,7 +535,10 @@ | |||||
| "$(PROJECT_DIR)/Flutter", | "$(PROJECT_DIR)/Flutter", | ||||
| ); | ); | ||||
| INFOPLIST_FILE = Runner/Info.plist; | INFOPLIST_FILE = Runner/Info.plist; | ||||
| LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | |||||
| LD_RUNPATH_SEARCH_PATHS = ( | |||||
| "$(inherited)", | |||||
| "@executable_path/Frameworks", | |||||
| ); | |||||
| LIBRARY_SEARCH_PATHS = ( | LIBRARY_SEARCH_PATHS = ( | ||||
| "$(inherited)", | "$(inherited)", | ||||
| "$(PROJECT_DIR)/Flutter", | "$(PROJECT_DIR)/Flutter", | ||||
| @@ -503,4 +577,4 @@ | |||||
| /* End XCConfigurationList section */ | /* End XCConfigurationList section */ | ||||
| }; | }; | ||||
| rootObject = 97C146E61CF9000F007C117D /* Project object */; | rootObject = 97C146E61CF9000F007C117D /* Project object */; | ||||
| } | |||||
| } | |||||
| @@ -2,6 +2,6 @@ | |||||
| <Workspace | <Workspace | ||||
| version = "1.0"> | version = "1.0"> | ||||
| <FileRef | <FileRef | ||||
| location = "group:Runner.xcodeproj"> | |||||
| location = "self:"> | |||||
| </FileRef> | </FileRef> | ||||
| </Workspace> | </Workspace> | ||||
| @@ -1,6 +1,6 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
| <Scheme | <Scheme | ||||
| LastUpgradeVersion = "1020" | |||||
| LastUpgradeVersion = "1300" | |||||
| version = "1.3"> | version = "1.3"> | ||||
| <BuildAction | <BuildAction | ||||
| parallelizeBuildables = "YES" | parallelizeBuildables = "YES" | ||||
| @@ -4,4 +4,7 @@ | |||||
| <FileRef | <FileRef | ||||
| location = "group:Runner.xcodeproj"> | location = "group:Runner.xcodeproj"> | ||||
| </FileRef> | </FileRef> | ||||
| <FileRef | |||||
| location = "group:Pods/Pods.xcodeproj"> | |||||
| </FileRef> | |||||
| </Workspace> | </Workspace> | ||||
| @@ -41,5 +41,7 @@ | |||||
| </array> | </array> | ||||
| <key>UIViewControllerBasedStatusBarAppearance</key> | <key>UIViewControllerBasedStatusBarAppearance</key> | ||||
| <false/> | <false/> | ||||
| <key>CADisableMinimumFrameDurationOnPhone</key> | |||||
| <true/> | |||||
| </dict> | </dict> | ||||
| </plist> | </plist> | ||||
| @@ -529,7 +529,7 @@ class _AssetDetailsState extends State<AssetDetails> with TickerProviderStateMix | |||||
| children: <Widget>[ | children: <Widget>[ | ||||
| Expanded( | Expanded( | ||||
| flex: 5, | flex: 5, | ||||
| child: FlatButton( | |||||
| child: TextButton( | |||||
| onPressed: ()async{ | onPressed: ()async{ | ||||
| if(barCode.text!=''&&prefixCode.text!='')await findAsset(prefixCode.text+barCode.text,silent: true); | if(barCode.text!=''&&prefixCode.text!='')await findAsset(prefixCode.text+barCode.text,silent: true); | ||||
| else _asset.tag_number = null; | else _asset.tag_number = null; | ||||
| @@ -546,13 +546,13 @@ class _AssetDetailsState extends State<AssetDetails> with TickerProviderStateMix | |||||
| title: Text('Append New Asset'), | title: Text('Append New Asset'), | ||||
| content: Text('${(widget.no==null)?'Insert':'Update'} brand new asset?'), | content: Text('${(widget.no==null)?'Insert':'Update'} brand new asset?'), | ||||
| actions: <Widget>[ | actions: <Widget>[ | ||||
| FlatButton( | |||||
| TextButton( | |||||
| onPressed: ()async{ | onPressed: ()async{ | ||||
| Navigator.pop(context,true); | Navigator.pop(context,true); | ||||
| }, | }, | ||||
| child: Text('Save'), | child: Text('Save'), | ||||
| ), | ), | ||||
| FlatButton( | |||||
| TextButton( | |||||
| onPressed: ()async{ | onPressed: ()async{ | ||||
| Navigator.pop(context,false); | Navigator.pop(context,false); | ||||
| }, | }, | ||||
| @@ -591,19 +591,23 @@ class _AssetDetailsState extends State<AssetDetails> with TickerProviderStateMix | |||||
| util.showToast('ERROR', 'Please complete the asset data'); | util.showToast('ERROR', 'Please complete the asset data'); | ||||
| } | } | ||||
| }, | }, | ||||
| color: Colors.green, | |||||
| style: TextButton.styleFrom( | |||||
| backgroundColor: Colors.green, | |||||
| ), | |||||
| child: Container(alignment: Alignment.center,height: 50, | child: Container(alignment: Alignment.center,height: 50, | ||||
| child: Text('Save')), | |||||
| child: Text('Save',style: TextStyle(color: Colors.white),)), | |||||
| ), | ), | ||||
| ), | ), | ||||
| Expanded( | Expanded( | ||||
| flex: 5, | flex: 5, | ||||
| child: FlatButton( | |||||
| child: TextButton( | |||||
| style: TextButton.styleFrom( | |||||
| backgroundColor: Colors.red, | |||||
| ), | |||||
| onPressed: (){ | onPressed: (){ | ||||
| Navigator.pop(context); | Navigator.pop(context); | ||||
| }, | }, | ||||
| color: Colors.red, | |||||
| child: Container(alignment: Alignment.center,height:50,child: Text('Cancel')), | |||||
| child: Container(alignment: Alignment.center,height:50,child: Text('Cancel',style: TextStyle(color: Colors.white))), | |||||
| ), | ), | ||||
| ), | ), | ||||
| ], | ], | ||||
| @@ -53,7 +53,7 @@ class _AssetLogsState extends State<AssetLogs> { | |||||
| title: Text('Pick nonAuditAsset'), | title: Text('Pick nonAuditAsset'), | ||||
| content: Text("Select Asset ${idxAsset.tag_number}"), | content: Text("Select Asset ${idxAsset.tag_number}"), | ||||
| actions: [ | actions: [ | ||||
| FlatButton( | |||||
| TextButton( | |||||
| onPressed: (){ | onPressed: (){ | ||||
| Navigator.pop(context,true); | Navigator.pop(context,true); | ||||
| }, | }, | ||||
| @@ -48,18 +48,18 @@ class _HomeState extends State<Home> { | |||||
| super.initState(); | super.initState(); | ||||
| WidgetsBinding.instance.addPostFrameCallback((_) async { | WidgetsBinding.instance.addPostFrameCallback((_) async { | ||||
| // await loadMenu(); | // await loadMenu(); | ||||
| final androidVersion = await DeviceInfoPlugin().androidInfo; | |||||
| if ((androidVersion.version.sdkInt ?? 0) >= 30) { | |||||
| await util.permissionCheck(this.context,pHandler.Permission.manageExternalStorage,()async{print("storage permit granted!");},customMessage: " untuk menyimpan data backup"); | |||||
| } else { | |||||
| // final androidVersion = await DeviceInfoPlugin().androidInfo; | |||||
| // if ((androidVersion.version.sdkInt ?? 0) >= 30) { | |||||
| // await util.permissionCheck(this.context,pHandler.Permission.manageExternalStorage,()async{print("storage permit granted!");},customMessage: " untuk menyimpan data backup"); | |||||
| // } else { | |||||
| await util.permissionCheck(this.context,pHandler.Permission.storage,()async{print("storage permit granted!");},customMessage: " untuk menyimpan data backup"); | await util.permissionCheck(this.context,pHandler.Permission.storage,()async{print("storage permit granted!");},customMessage: " untuk menyimpan data backup"); | ||||
| } | |||||
| // } | |||||
| }); | }); | ||||
| } | } | ||||
| clearData(context)async{ | clearData(context)async{ | ||||
| String errMsg; | String errMsg; | ||||
| Directory documentsDirectory = await getExternalStorageDirectory(); | |||||
| Directory documentsDirectory = await getApplicationDocumentsDirectory(); | |||||
| String path = join(documentsDirectory.path, "assets.db"); | String path = join(documentsDirectory.path, "assets.db"); | ||||
| File db = File(path); | File db = File(path); | ||||
| if(db.existsSync()){ | if(db.existsSync()){ | ||||
| @@ -72,7 +72,7 @@ class _HomeState extends State<Home> { | |||||
| title: Text('Clear Data ?'), | title: Text('Clear Data ?'), | ||||
| content: Text('Proceed to clear any remaining units data on this device?'), | content: Text('Proceed to clear any remaining units data on this device?'), | ||||
| actions: <Widget>[ | actions: <Widget>[ | ||||
| FlatButton( | |||||
| TextButton( | |||||
| child: Text('Proceed'), | child: Text('Proceed'), | ||||
| onPressed: ()async{ | onPressed: ()async{ | ||||
| util.showLoading(context); | util.showLoading(context); | ||||
| @@ -112,7 +112,7 @@ class _HomeState extends State<Home> { | |||||
| util.showToast(errMsg==null?"SUCCESS":"ERROR",errMsg??'Data Cleared'); | util.showToast(errMsg==null?"SUCCESS":"ERROR",errMsg??'Data Cleared'); | ||||
| }, | }, | ||||
| ), | ), | ||||
| FlatButton( | |||||
| TextButton( | |||||
| child: Text('Cancel'), | child: Text('Cancel'), | ||||
| onPressed: (){Navigator.pop(context,false);}, | onPressed: (){Navigator.pop(context,false);}, | ||||
| ) | ) | ||||
| @@ -131,7 +131,7 @@ class _HomeState extends State<Home> { | |||||
| padding: const EdgeInsets.only(bottom:45.0), | padding: const EdgeInsets.only(bottom:45.0), | ||||
| child: FloatingActionButton( | child: FloatingActionButton( | ||||
| onPressed: ()async{ | onPressed: ()async{ | ||||
| Directory documentsDirectory = await getExternalStorageDirectory(); | |||||
| Directory documentsDirectory = await getApplicationDocumentsDirectory(); | |||||
| String path = join(documentsDirectory.path, "assets.db"); | String path = join(documentsDirectory.path, "assets.db"); | ||||
| File db = File(path); | File db = File(path); | ||||
| if(db.existsSync()){ | if(db.existsSync()){ | ||||
| @@ -214,7 +214,7 @@ class _HomeState extends State<Home> { | |||||
| }, | }, | ||||
| ), | ), | ||||
| actions: <Widget>[ | actions: <Widget>[ | ||||
| FlatButton( | |||||
| TextButton( | |||||
| child: Text('OK'), | child: Text('OK'), | ||||
| onPressed: (){ | onPressed: (){ | ||||
| prefs.setString(keyClass.hostAddress,(hostAddress.text=='')?'https://asset.thamringroup.web.id':hostAddress.text); | prefs.setString(keyClass.hostAddress,(hostAddress.text=='')?'https://asset.thamringroup.web.id':hostAddress.text); | ||||
| @@ -246,7 +246,7 @@ class _HomeState extends State<Home> { | |||||
| ], | ], | ||||
| )); | )); | ||||
| if(isBackup??false){ | if(isBackup??false){ | ||||
| var result = await DBHelper.database.backupDb(context); | |||||
| var result = await DBHelper.database.backupDb(context:context); | |||||
| util.showToast(result["STATUS"]==1?'NORMAL':'ERROR', result['MSG']); | util.showToast(result["STATUS"]==1?'NORMAL':'ERROR', result['MSG']); | ||||
| } | } | ||||
| } | } | ||||
| @@ -281,7 +281,7 @@ class _HomeState extends State<Home> { | |||||
| if(isRestore??false){ | if(isRestore??false){ | ||||
| var response; | var response; | ||||
| bool isclear; | bool isclear; | ||||
| Directory documentsDirectory = await getExternalStorageDirectory(); | |||||
| Directory documentsDirectory = await getApplicationDocumentsDirectory(); | |||||
| String path = join(documentsDirectory.path, "assets.db"); | String path = join(documentsDirectory.path, "assets.db"); | ||||
| File db = File(path); | File db = File(path); | ||||
| if(db.existsSync()){ | if(db.existsSync()){ | ||||
| @@ -375,13 +375,13 @@ class _HomeState extends State<Home> { | |||||
| })), | })), | ||||
| ), | ), | ||||
| actions: <Widget>[ | actions: <Widget>[ | ||||
| FlatButton( | |||||
| TextButton( | |||||
| onPressed: ()async{ | onPressed: ()async{ | ||||
| Navigator.pop(context,true); | Navigator.pop(context,true); | ||||
| }, | }, | ||||
| child: Text('Next'), | child: Text('Next'), | ||||
| ), | ), | ||||
| FlatButton( | |||||
| TextButton( | |||||
| onPressed: ()async{ | onPressed: ()async{ | ||||
| Navigator.pop(context,false); | Navigator.pop(context,false); | ||||
| }, | }, | ||||
| @@ -418,13 +418,13 @@ class _HomeState extends State<Home> { | |||||
| })), | })), | ||||
| ), | ), | ||||
| actions: <Widget>[ | actions: <Widget>[ | ||||
| FlatButton( | |||||
| TextButton( | |||||
| onPressed: ()async{ | onPressed: ()async{ | ||||
| Navigator.pop(context,true); | Navigator.pop(context,true); | ||||
| }, | }, | ||||
| child: Text('Get'), | child: Text('Get'), | ||||
| ), | ), | ||||
| FlatButton( | |||||
| TextButton( | |||||
| onPressed: ()async{ | onPressed: ()async{ | ||||
| Navigator.pop(context,false); | Navigator.pop(context,false); | ||||
| }, | }, | ||||
| @@ -512,7 +512,7 @@ class _HomeState extends State<Home> { | |||||
| child: InkWell( | child: InkWell( | ||||
| onTap: ()async{ | onTap: ()async{ | ||||
| await Future.delayed(Duration(milliseconds: 300)); | await Future.delayed(Duration(milliseconds: 300)); | ||||
| Directory documentsDirectory = await getExternalStorageDirectory(); | |||||
| Directory documentsDirectory = await getApplicationDocumentsDirectory(); | |||||
| String path = join(documentsDirectory.path, "assets.db"); | String path = join(documentsDirectory.path, "assets.db"); | ||||
| File db = File(path); | File db = File(path); | ||||
| if(db.existsSync()) Navigator.pushNamed(context, '/stocking'); | if(db.existsSync()) Navigator.pushNamed(context, '/stocking'); | ||||
| @@ -544,7 +544,7 @@ class _HomeState extends State<Home> { | |||||
| InkWell( | InkWell( | ||||
| onTap: ()async{ | onTap: ()async{ | ||||
| final file = File( | final file = File( | ||||
| "${(await getExternalStorageDirectory()).path}/assets.db"); | |||||
| "${(await getApplicationDocumentsDirectory()).path}/assets.db"); | |||||
| if(file.existsSync()){ | if(file.existsSync()){ | ||||
| TextEditingController sendingUser = new TextEditingController(); | TextEditingController sendingUser = new TextEditingController(); | ||||
| sendingUser.text = prefs.getString(keyClass.user)??''; | sendingUser.text = prefs.getString(keyClass.user)??''; | ||||
| @@ -557,7 +557,7 @@ class _HomeState extends State<Home> { | |||||
| controller: sendingUser, | controller: sendingUser, | ||||
| ), | ), | ||||
| actions: [ | actions: [ | ||||
| FlatButton( | |||||
| TextButton( | |||||
| child: Text('Send'), | child: Text('Send'), | ||||
| onPressed: ()async{ | onPressed: ()async{ | ||||
| if(sendingUser.text!='') Navigator.pop(context,true); | if(sendingUser.text!='') Navigator.pop(context,true); | ||||
| @@ -631,7 +631,7 @@ class _HomeState extends State<Home> { | |||||
| ), | ), | ||||
| InkWell( | InkWell( | ||||
| onTap: ()async{ | onTap: ()async{ | ||||
| Directory documentsDirectory = await getExternalStorageDirectory(); | |||||
| Directory documentsDirectory = await getApplicationDocumentsDirectory(); | |||||
| String path = join(documentsDirectory.path, "assets.db"); | String path = join(documentsDirectory.path, "assets.db"); | ||||
| File db = File(path); | File db = File(path); | ||||
| if(db.existsSync()) await clearData(context); | if(db.existsSync()) await clearData(context); | ||||
| @@ -392,7 +392,7 @@ class _StockingState extends State<Stocking> with TickerProviderStateMixin { | |||||
| title: Text('Delete Asset?'), | title: Text('Delete Asset?'), | ||||
| content: Text("Delete this asset (${insertAsset[index].tag_number})?"), | content: Text("Delete this asset (${insertAsset[index].tag_number})?"), | ||||
| actions: [ | actions: [ | ||||
| FlatButton( | |||||
| TextButton( | |||||
| child: Text('Delete'), | child: Text('Delete'), | ||||
| onPressed: ()async{ | onPressed: ()async{ | ||||
| var res = await DBHelper.database.deleteInsertAsset(insertAsset[index].no); | var res = await DBHelper.database.deleteInsertAsset(insertAsset[index].no); | ||||
| @@ -25,7 +25,7 @@ class DBHelper{ | |||||
| return _db; | return _db; | ||||
| } | } | ||||
| backupDb(context) async{ | |||||
| backupDb({context}) async{ | |||||
| var result = {"STATUS":0,"MSG":"Backup gagal!"}; | var result = {"STATUS":0,"MSG":"Backup gagal!"}; | ||||
| var stock_id = prefs.getString(keyClass.dbName)??''; | var stock_id = prefs.getString(keyClass.dbName)??''; | ||||
| if(stock_id != ''){ | if(stock_id != ''){ | ||||
| @@ -39,9 +39,9 @@ class DBHelper{ | |||||
| await prefs.remove(keyClass.backup_stock_id); | await prefs.remove(keyClass.backup_stock_id); | ||||
| if(stock_id !='' && stock_id != null ) await prefs.setString(keyClass.backup_stock_id,stock_id); | if(stock_id !='' && stock_id != null ) await prefs.setString(keyClass.backup_stock_id,stock_id); | ||||
| //backupDatabase | //backupDatabase | ||||
| print(["aaaaaa",dbPath]); | |||||
| String backupPath = join(dbPath.substring(0,dbPath.indexOf("/Android"))+"/Download", "${prefs.getString(keyClass.backup_stock_id)}_assets.db"); | |||||
| print("bbbbbb"); | |||||
| // String backupPath = join(dbPath.substring(0,dbPath.indexOf("/Android"))+"/Download", "${prefs.getString(keyClass.backup_stock_id)}_assets.db"); | |||||
| Directory documentsDirectory = await getApplicationDocumentsDirectory(); | |||||
| String backupPath = join(documentsDirectory.path, "${prefs.getString(keyClass.backup_stock_id)}_assets.db"); | |||||
| File backupFile = new File(backupPath); | File backupFile = new File(backupPath); | ||||
| File dbFile = File(dbPath); | File dbFile = File(dbPath); | ||||
| if(dbFile.existsSync()){ | if(dbFile.existsSync()){ | ||||
| @@ -71,8 +71,9 @@ class DBHelper{ | |||||
| var result = {"STATUS":0,"MSG":"File Backup tidak ditemukan!"}; | var result = {"STATUS":0,"MSG":"File Backup tidak ditemukan!"}; | ||||
| if(prefs.getString(keyClass.backup_stock_id)!=null){ | if(prefs.getString(keyClass.backup_stock_id)!=null){ | ||||
| await util.permissionCheck(context,pHandler.Permission.storage,()async{ | await util.permissionCheck(context,pHandler.Permission.storage,()async{ | ||||
| Directory documentsDirectory = await getExternalStorageDirectory(); | |||||
| String backupPath = join(documentsDirectory.path.substring(0,documentsDirectory.path.indexOf("/Android"))+"/Download", "${prefs.getString(keyClass.backup_stock_id)}_assets.db"); | |||||
| Directory documentsDirectory = await getApplicationDocumentsDirectory(); | |||||
| // String backupPath = join(documentsDirectory.path.substring(0,documentsDirectory.path.indexOf("/Android"))+"/Download", "${prefs.getString(keyClass.backup_stock_id)}_assets.db"); | |||||
| String backupPath = join(documentsDirectory.path, "${prefs.getString(keyClass.backup_stock_id)}_assets.db"); | |||||
| File backupdbFile = File(backupPath); | File backupdbFile = File(backupPath); | ||||
| if(backupdbFile.existsSync()){ | if(backupdbFile.existsSync()){ | ||||
| File dbFile = new File(join(documentsDirectory.path, "assets.db")); | File dbFile = new File(join(documentsDirectory.path, "assets.db")); | ||||
| @@ -88,7 +89,7 @@ class DBHelper{ | |||||
| } | } | ||||
| initDb() async { | initDb() async { | ||||
| Directory documentsDirectory = await getExternalStorageDirectory(); | |||||
| Directory documentsDirectory = await getApplicationDocumentsDirectory(); | |||||
| String path = join(documentsDirectory.path, "assets.db"); | String path = join(documentsDirectory.path, "assets.db"); | ||||
| var theDb = await openDatabase(path, version: 1,onCreate: _onCreate); | var theDb = await openDatabase(path, version: 1,onCreate: _onCreate); | ||||
| return theDb; | return theDb; | ||||
| @@ -102,17 +103,27 @@ class DBHelper{ | |||||
| } | } | ||||
| void _onCreate(Database db, int version) async { | void _onCreate(Database db, int version) async { | ||||
| Directory documentsDirectory = await getExternalStorageDirectory(); | |||||
| Directory documentsDirectory = await getApplicationDocumentsDirectory(); | |||||
| String path = join(documentsDirectory.path, "assets.db"); | String path = join(documentsDirectory.path, "assets.db"); | ||||
| File file = File(path); | File file = File(path); | ||||
| print('Database created, ${file.lengthSync()}'); | print('Database created, ${file.lengthSync()}'); | ||||
| } | } | ||||
| autoBackup(database)async{ | |||||
| var checkCount = await database.query(tableName.insert,where: "${columnName.blob} is not null"); | |||||
| return checkCount.isNotEmpty&& checkCount.length%5==0; | |||||
| } | |||||
| insertAsset(Asset newAsset) async{ | insertAsset(Asset newAsset) async{ | ||||
| try{ | try{ | ||||
| final database = await db; | final database = await db; | ||||
| await database.rawInsert("Insert into ${tableName.insert} (${columnName.tag_number},${columnName.blob},${columnName.keterangan}) VALUES(?,?,?)", [newAsset.tag_number,newAsset.blob,newAsset.keterangan]); | await database.rawInsert("Insert into ${tableName.insert} (${columnName.tag_number},${columnName.blob},${columnName.keterangan}) VALUES(?,?,?)", [newAsset.tag_number,newAsset.blob,newAsset.keterangan]); | ||||
| await database.rawQuery("UPDATE ${tableName.ref} SET ${columnName.flag} = 'TRUE' WHERE ${columnName.tag_number} = '${newAsset.tag_number}'"); | await database.rawQuery("UPDATE ${tableName.ref} SET ${columnName.flag} = 'TRUE' WHERE ${columnName.tag_number} = '${newAsset.tag_number}'"); | ||||
| if(await autoBackup(database)){ | |||||
| backupDb(); | |||||
| } | |||||
| return true; | return true; | ||||
| } | } | ||||
| catch(e){ | catch(e){ | ||||
| @@ -125,6 +136,11 @@ class DBHelper{ | |||||
| try{ | try{ | ||||
| final database = await db; | final database = await db; | ||||
| await database.rawUpdate("Update ${tableName.insert} SET ${columnName.blob} = ?, ${columnName.tag_number} = ?, ${columnName.keterangan} = ? WHERE ${columnName.no} = ?", [newAsset.blob,newAsset.tag_number,newAsset.keterangan,newAsset.no]); | await database.rawUpdate("Update ${tableName.insert} SET ${columnName.blob} = ?, ${columnName.tag_number} = ?, ${columnName.keterangan} = ? WHERE ${columnName.no} = ?", [newAsset.blob,newAsset.tag_number,newAsset.keterangan,newAsset.no]); | ||||
| if(await autoBackup(database)){ | |||||
| backupDb(); | |||||
| } | |||||
| return true; | return true; | ||||
| } | } | ||||
| catch(e){ | catch(e){ | ||||
| @@ -49,7 +49,7 @@ class file_Trans_Handler { | |||||
| _progress.add(0.0); | _progress.add(0.0); | ||||
| print('Finish Download'); | print('Finish Download'); | ||||
| final file = File( | final file = File( | ||||
| "${(await getExternalStorageDirectory()).path}/$fileName"); | |||||
| "${(await getApplicationDocumentsDirectory()).path}/$fileName"); | |||||
| await file.writeAsBytes(_bytes); | await file.writeAsBytes(_bytes); | ||||
| _path = file.path; | _path = file.path; | ||||
| }) | }) | ||||
| @@ -72,7 +72,7 @@ class file_Trans_Handler { | |||||
| List<int> _bytes = []; | List<int> _bytes = []; | ||||
| _finish = false; | _finish = false; | ||||
| final file = File( | final file = File( | ||||
| "${(await getExternalStorageDirectory()).path}/$fileName"); | |||||
| "${(await getApplicationDocumentsDirectory()).path}/$fileName"); | |||||
| _total = file.lengthSync(); | _total = file.lengthSync(); | ||||
| print(_total/1024); | print(_total/1024); | ||||
| try{ | try{ | ||||
| @@ -13,7 +13,7 @@ class Util{ | |||||
| permissionCheck(context,pHandler.Permission permissionType,ifGranted,{customMessage=''})async{ | permissionCheck(context,pHandler.Permission permissionType,ifGranted,{customMessage=''})async{ | ||||
| pHandler.PermissionStatus permission = await permissionType.status; | pHandler.PermissionStatus permission = await permissionType.status; | ||||
| if(permission!= pHandler.PermissionStatus.granted){ | |||||
| if(permission!= pHandler.PermissionStatus.granted && context != null){ | |||||
| if(permission== pHandler.PermissionStatus.denied || permission== pHandler.PermissionStatus.restricted){ | if(permission== pHandler.PermissionStatus.denied || permission== pHandler.PermissionStatus.restricted){ | ||||
| showToast('NORMAL', '${permissionType.toString().substring(permissionType.toString().lastIndexOf('.')+1)} permission is needed$customMessage. Please grant the permission!'); | showToast('NORMAL', '${permissionType.toString().substring(permissionType.toString().lastIndexOf('.')+1)} permission is needed$customMessage. Please grant the permission!'); | ||||
| await Future.delayed(Duration(seconds: 3)); | await Future.delayed(Duration(seconds: 3)); | ||||
| @@ -21,7 +21,7 @@ packages: | |||||
| name: async | name: async | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "2.8.2" | |||||
| version: "2.9.0" | |||||
| barcode_scan2: | barcode_scan2: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| @@ -42,21 +42,14 @@ packages: | |||||
| name: characters | name: characters | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.2.0" | |||||
| charcode: | |||||
| dependency: transitive | |||||
| description: | |||||
| name: charcode | |||||
| url: "https://pub.dartlang.org" | |||||
| source: hosted | |||||
| version: "1.3.1" | |||||
| version: "1.2.1" | |||||
| clock: | clock: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: clock | name: clock | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.1.0" | |||||
| version: "1.1.1" | |||||
| collection: | collection: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| @@ -133,7 +126,7 @@ packages: | |||||
| name: fake_async | name: fake_async | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.3.0" | |||||
| version: "1.3.1" | |||||
| ffi: | ffi: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| @@ -267,14 +260,14 @@ packages: | |||||
| name: matcher | name: matcher | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.12.11" | |||||
| version: "0.12.12" | |||||
| material_color_utilities: | material_color_utilities: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: material_color_utilities | name: material_color_utilities | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.1.4" | |||||
| version: "0.1.5" | |||||
| matrix_gesture_detector: | matrix_gesture_detector: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| @@ -288,14 +281,14 @@ packages: | |||||
| name: meta | name: meta | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.7.0" | |||||
| version: "1.8.0" | |||||
| path: | path: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: path | name: path | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.8.1" | |||||
| version: "1.8.2" | |||||
| path_provider: | path_provider: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| @@ -489,7 +482,7 @@ packages: | |||||
| name: source_span | name: source_span | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.8.2" | |||||
| version: "1.9.0" | |||||
| sqflite: | sqflite: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| @@ -524,7 +517,7 @@ packages: | |||||
| name: string_scanner | name: string_scanner | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.1.0" | |||||
| version: "1.1.1" | |||||
| synchronized: | synchronized: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| @@ -538,14 +531,14 @@ packages: | |||||
| name: term_glyph | name: term_glyph | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.2.0" | |||||
| version: "1.2.1" | |||||
| test_api: | test_api: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: test_api | name: test_api | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.4.9" | |||||
| version: "0.4.12" | |||||
| typed_data: | typed_data: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| @@ -13,7 +13,7 @@ description: Application to check assets | |||||
| # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. | ||||
| # Read more about iOS versioning at | # Read more about iOS versioning at | ||||
| # 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 | ||||
| version: 1.0.4+6 | |||||
| version: 1.0.5+7 | |||||
| environment: | environment: | ||||
| sdk: ">=2.7.0 <3.0.0" | sdk: ">=2.7.0 <3.0.0" | ||||