commit | 9e462852cb765e65495feb240c9677bd19fb73ef | [log] [tgz] |
---|---|---|
author | Michael Thomsen <mit@google.com> | Sat Dec 12 00:45:41 2020 +0100 |
committer | GitHub <noreply@github.com> | Fri Dec 11 15:45:41 2020 -0800 |
tree | 0ee0a01d093221770b8aa2ffae830d22b344fe3f | |
parent | 623c5156733b686797a60ae163ba17e2c7b2ffd3 [diff] |
[a-c] Update Flutter SDK constraint (#3320) Update Flutter SDK constraint to match templates.
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.