Bläddra i källkod

add* backup and restore db

master
jefry 3 år sedan
förälder
incheckning
c4f2c10f1f
3 ändrade filer med 5 tillägg och 4 borttagningar
  1. +1
    -1
      android/app/build.gradle
  2. +3
    -1
      android/app/src/main/AndroidManifest.xml
  3. +1
    -2
      lib/home.dart

+ 1
- 1
android/app/build.gradle Visa fil

@@ -45,7 +45,7 @@ android {
defaultConfig { defaultConfig {
applicationId "com.thamringroup.assetstock" applicationId "com.thamringroup.assetstock"
minSdkVersion 18 minSdkVersion 18
targetSdkVersion 29
targetSdkVersion 30
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
multiDexEnabled true multiDexEnabled true


+ 3
- 1
android/app/src/main/AndroidManifest.xml Visa fil

@@ -8,6 +8,7 @@
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_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,7 +22,8 @@
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
android:exported="true">
<!-- Specifies an Android theme to apply to this Activity as soon as <!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues while the Flutter UI initializes. After that, this theme continues


+ 1
- 2
lib/home.dart Visa fil

@@ -45,8 +45,7 @@ class _HomeState extends State<Home> {
super.initState(); super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) async { WidgetsBinding.instance.addPostFrameCallback((_) async {
// await loadMenu(); // await loadMenu();
await util.permissionCheck(context,pHandler.Permission.storage,()async{print("storage permit granted!");},customMessage: " untuk menyimpan data backup");

await util.permissionCheck(context,pHandler.Permission.manageExternalStorage,()async{print("storage permit granted!");},customMessage: " untuk menyimpan data backup");
}); });
} }




Laddar…
Avbryt
Spara