Git Product home page Git Product logo

external_path's Introduction

external_path

external_path is a flutter plugin that provides internal, external storage path and external public storage path.

https://pub.dev/packages/external_path

Features

ExternalPath.getExternalStoragePublicDirectory() needs Public Directory Type argument Below given table contains the types of argument you can pass to getExternalStoragePublicDirectory() function

ExternalPath
ExternalPath.DIRECTORY_MUSIC
ExternalPath.DIRECTORY_PODCASTS
ExternalPath.DIRECTORY_RINGTONES
ExternalPath.DIRECTORY_ALARMS
ExternalPath.DIRECTORY_NOTIFICATIONS
ExternalPath.DIRECTORY_PICTURES
ExternalPath.DIRECTORY_MOVIES
ExternalPath.DIRECTORY_DOWNLOADS
ExternalPath.DIRECTORY_DCIM
ExternalPath.DIRECTORY_DOCUMENTS
ExternalPath.DIRECTORY_SCREENSHOTS
ExternalPath.DIRECTORY_AUDIOBOOKS

Usage

First Add external_path as a dipendency in your project pubspeck.yaml.

Then, import external_path package.

import 'package:external_path/external_path.dart';

Package has two functions

  // Get storage directory paths
  Future<void> getPath_1() async {
    var path = await ExternalPath.getExternalStorageDirectories();
    print(path);  // [/storage/emulated/0, /storage/B3AE-4D28]

    // please note: B3AE-4D28 is external storage (SD card) folder name it can be any.
  }


  // To get public storage directory path
  Future<void> getPath_2() async {
    var path = await .getExternalStoragePublicDirectory(ExternalPath.DIRECTORY_DOWNLOADS);
    print(path);  // /storage/emulated/0/Download
  }

external_path's People

Contributors

aakashkondhalkar avatar bzkrterdm avatar

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.