| @@ -6,9 +6,10 @@ | |||
| additional functionality it is fine to subclass or reimplement | |||
| FlutterApplication and put your custom class here. --> | |||
| <uses-permission android:name="android.permission.INTERNET" /> | |||
| <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |||
| <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> | |||
| <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/> | |||
| <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | |||
| <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" | |||
| android:maxSdkVersion="28" /> | |||
| <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" /> | |||
| <application | |||
| android:name="${applicationName}" | |||
| android:label="assetstock" | |||
| @@ -2,6 +2,7 @@ import 'dart:async'; | |||
| import 'dart:convert'; | |||
| import 'dart:io'; | |||
| import 'package:assetstock/util/download_Upload_Handler.dart'; | |||
| import 'package:flutter/services.dart'; | |||
| import 'package:path/path.dart'; | |||
| import 'package:flutter/cupertino.dart'; | |||
| import 'package:flutter/material.dart'; | |||
| @@ -10,6 +11,8 @@ import 'main.dart'; | |||
| import 'util/prefsKey.dart'; | |||
| import 'util/dbHandler.dart'; | |||
| import 'package:permission_handler/permission_handler.dart' as pHandler; | |||
| import 'package:device_info_plus/device_info_plus.dart'; | |||
| class Home extends StatefulWidget { | |||
| @@ -45,7 +48,12 @@ class _HomeState extends State<Home> { | |||
| super.initState(); | |||
| WidgetsBinding.instance.addPostFrameCallback((_) async { | |||
| // await loadMenu(); | |||
| await util.permissionCheck(context,pHandler.Permission.manageExternalStorage,()async{print("storage permit granted!");},customMessage: " untuk menyimpan data backup"); | |||
| final androidVersion = await DeviceInfoPlugin().androidInfo; | |||
| if ((androidVersion.version.sdkInt ?? 0) >= 30) { | |||
| await util.permissionCheck(context,pHandler.Permission.manageExternalStorage,()async{print("storage permit granted!");},customMessage: " untuk menyimpan data backup"); | |||
| } else { | |||
| await util.permissionCheck(context,pHandler.Permission.storage,()async{print("storage permit granted!");},customMessage: " untuk menyimpan data backup"); | |||
| } | |||
| }); | |||
| } | |||
| @@ -545,6 +553,7 @@ class _HomeState extends State<Home> { | |||
| builder: (context)=>AlertDialog( | |||
| title: Text('Sender'), | |||
| content: TextField( | |||
| inputFormatters: [FilteringTextInputFormatter.allow(RegExp("[a-zA-Z0-9 ]"))], | |||
| controller: sendingUser, | |||
| ), | |||
| actions: [ | |||
| @@ -85,6 +85,48 @@ packages: | |||
| url: "https://pub.dartlang.org" | |||
| source: hosted | |||
| version: "1.0.5" | |||
| device_info_plus: | |||
| dependency: "direct main" | |||
| description: | |||
| name: device_info_plus | |||
| url: "https://pub.dartlang.org" | |||
| source: hosted | |||
| version: "4.0.1" | |||
| device_info_plus_linux: | |||
| dependency: transitive | |||
| description: | |||
| name: device_info_plus_linux | |||
| url: "https://pub.dartlang.org" | |||
| source: hosted | |||
| version: "2.1.1" | |||
| device_info_plus_macos: | |||
| dependency: transitive | |||
| description: | |||
| name: device_info_plus_macos | |||
| url: "https://pub.dartlang.org" | |||
| source: hosted | |||
| version: "2.2.3" | |||
| device_info_plus_platform_interface: | |||
| dependency: transitive | |||
| description: | |||
| name: device_info_plus_platform_interface | |||
| url: "https://pub.dartlang.org" | |||
| source: hosted | |||
| version: "2.3.0+1" | |||
| device_info_plus_web: | |||
| dependency: transitive | |||
| description: | |||
| name: device_info_plus_web | |||
| url: "https://pub.dartlang.org" | |||
| source: hosted | |||
| version: "2.1.0" | |||
| device_info_plus_windows: | |||
| dependency: transitive | |||
| description: | |||
| name: device_info_plus_windows | |||
| url: "https://pub.dartlang.org" | |||
| source: hosted | |||
| version: "3.0.1" | |||
| fake_async: | |||
| dependency: transitive | |||
| description: | |||
| @@ -13,7 +13,7 @@ description: Application to check assets | |||
| # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. | |||
| # Read more about iOS versioning at | |||
| # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html | |||
| version: 1.0.3+4 | |||
| version: 1.0.3+5 | |||
| environment: | |||
| sdk: ">=2.7.0 <3.0.0" | |||
| @@ -34,6 +34,7 @@ dependencies: | |||
| # Use with the CupertinoIcons class for iOS style icons. | |||
| cupertino_icons: ^1.0.5 | |||
| permission_handler: ^9.2.0 | |||
| device_info_plus: ^4.0.1 | |||
| dev_dependencies: | |||
| flutter_launcher_icons: | |||