FLUTTER ECOSYSTEM

rodydavis/file_access

Flutter के लिए वेब, डेस्कटॉप और मोबाइल के लिए File.io

file_access प्रोजेक्ट कवर
Stars
57
Forks
10
अंतिम पुश (UTC)
27 सित॰ 2021
प्रोजेक्ट स्थिति
सक्रिय
Rody Davis GitHub avatar
GITHUB User

Rody Davis ↗

Senior Developer Relations Engineer @google @google-deepmind supporting @google-antigravity

भाषाएँDartRubySwiftHTMLKotlinObjective-C

तकनीकी विषय

उपयोग की गई निर्भरताएँ

निर्भरता सूची 5 आइटम
  • flutter{"sdk":"flutter"}
  • file_picker^1.5.0+2
  • image_picker^0.6.3+4
  • file_chooser{"git":{"url":"https://github.com/google/flutter-desktop-embedding","path":"plugins/file_chooser","ref":"040f36c82b63e8764ec2fd97066767503a667b6d"}}
  • flutter_testडेवलपमेंट{"sdk":"flutter"}

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

README खोलें / बंद करें

file_access

An abstract way to handle files on iOS, Android, Desktop and Web!

Online Demo: https://rodydavis.github.io/file_access/

Installing:

dependencies:
  flutter:
    sdk: flutter
  file_access:
    git: https://github.com/rodydavis/file_access

Setup

Web

Add the following line to your body to make it work in Safari:

<input type="file" style="visibility:hidden;" id="file-picker" />
IOS

https://github.com/miguelpruivo/flutter_file_picker/wiki/Setup#ios

Getting Started

Pick a file:

final _file = await openFile();

Select multiple files:

final _files = await openFiles();

Pick an image:

final _file = await pickImage();

Pick a video:

final _file = await pickVideo();

Once you have the FileX type you can read the data:

final _bytes = await _file.readAsBytes();
final _string = await _file.readAsString();

Creating a new file:

final _file = FileX('path/to/file/file.txt');
await _file.writeAsString('My New Data!');
final _output = await _file.readAsString();
print(_output); // 'My New Data!'