A new Flutter project.
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
-
Add permission_handler in the pubspec.yaml file
-
Add the permissions in the AndroidManifest.xml file, for example:
<uses-permission android:name="android.permission.WRITE_EXTER*NAL_STORAGE" />
-
Request the permission in your code, for instance:
if (await Permission.storage.request().isGranted) { ... } else { Map<Permission, PermissionStatus> statuses = await [Permission.storage].request(); }
Run the following codes depending on the OS:
-
Android
flutter build apk --split-per-abi
flutter build apk
flutter install
-
Add flutter_launcher_icons in pubspec.yaml file and configure:
flutter_launcher_icons: android: true ios: true image_path: "assets/icon.png"
-
Run the following commands
flutter pub get flutter pub run flutter_launcher_icons
flutter upgrade