Reland "[cross_file] Migrate to null-safety. (#3452)" (#3469)

This reverts commit 4aacf970f3891c9cf23c768ca1c8bec04c42b35a.
9 files changed
tree: ef0de500e7282177299c4168a96d7e3888392745
  1. lib/
  2. test/
  3. CHANGELOG.md
  4. LICENSE
  5. pubspec.yaml
  6. README.md
README.md

cross_file

An abstraction to allow working with files across multiple platforms.

Usage

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.

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.