Giter VIP home page Giter VIP logo

flutter-simple-create-or-upload-file's Introduction

Simple Flutter upload or create file application example

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.

Requirements

AndroidMainifest.xml changes:

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"/>

How to use

Install application dependencies and run it:

cd simple-create-or-upload-file/app && flutter pub get && flutter run

Screenshots

no_file
Figure 1. No file created or selected
select_file
Figure 2. Select file dialog
create_file_page
Figure 3. Create file page
save_to_folder
Figure 4. Select folder dialog
after_upload_or_creation
Figure 5. File created or selected

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.