Flutter app that allows users to upload or create files on their device, while providing the real path of the selected file.This is particularly useful for developers who need to access the real path of a file, as opposed to the cached file path or URI.
In addition, the app includes a method that requests storage permission for all Android versions.
Features: - Real path support: When a user selects a file, RealPath provides the real path of the file instead of the cached file path or URI.
This ensures that developers can access the actual location of the file, which can be crucial for certain use cases.
-
File upload and creation: users can upload existing files or create new files directly from the app. The app provides a file manager interface where users can browse through their device’s files and folders.
-
Storage permission request: this app includes a method that requests storage permission for all Android versions. This ensures that users can access their files without any permission issues.
-
User-friendly interface: The app’s interface is designed to be easy to use and intuitive. Users can quickly upload or create files with just a few taps.
Whether you’re a developer who needs to access the real path of a file or just someone who wants to manage their files on-the-go, this is the perfect app for you. With its simple yet powerful features, this app makes file management a breeze.
To get storage access you need to write these three code lines in the AndroidManifest.xml stored in android>app>src.
In this project these lines are already written but generally to get storage access:
For Android version 11 or greater:
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
For Android version below 11:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
Install application dependencies and run it:
cd simple-create-or-upload-file/app && flutter pub get && flutter run