commit | e67f7f2a1efce1676499f35ab6934ecb6f20ef3b | [log] [tgz] |
---|---|---|
author | David Iglesias <ditman@gmail.com> | Tue Jan 26 18:14:52 2021 -0800 |
committer | GitHub <noreply@github.com> | Tue Jan 26 18:14:52 2021 -0800 |
tree | ef0de500e7282177299c4168a96d7e3888392745 | |
parent | d7cf598bb64c3aeb47b04da123eacd530dfa89b4 [diff] |
Reland "[cross_file] Migrate to null-safety. (#3452)" (#3469) This reverts commit 4aacf970f3891c9cf23c768ca1c8bec04c42b35a.
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.