commit | d7cf598bb64c3aeb47b04da123eacd530dfa89b4 | [log] [tgz] |
---|---|---|
author | David Iglesias <ditman@gmail.com> | Tue Jan 26 17:33:26 2021 -0800 |
committer | GitHub <noreply@github.com> | Tue Jan 26 17:33:26 2021 -0800 |
tree | 0d0a3f0036ca9c637a2e3b23f4d213535d832c12 | |
parent | 897887f82e7bc6a31bdcdaa30eebbbb2f95cac42 [diff] |
Revert "[cross_file] Migrate to null-safety. (#3452)" (#3468) This reverts commit ca9921196a7ae96edad91a9cd7b7d8fe9f5689ff.
An abstraction to allow working with files across multiple platforms.
Import package:cross/cross_info.dart
, instantiate a CrossFile
using a path or byte array and use its methods and properties to access the file and its metadata.
Example:
import 'package:cross_file/cross_file.dart'; final file = CrossFile('assets/hello.txt'); print('File information:'); print('- Path: ${file.path}'); print('- Name: ${file.name}'); print('- MIME type: ${file.mimeType}'); final fileContent = await file.readAsString(); print('Content of the file: ${fileContent}'); // e.g. "Moto G (4)"
You will find links to the API docs on the pub page.
For help getting started with Flutter, view our online documentation.
For help on editing plugin code, view the documentation.