# cross_file 0.3.1

An abstraction to allow working with files across multiple platforms.




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'cross_file:0.3.1'
```
Published: 2021-02-25T04:41:21.054945Z
Expected archive SHA-256: 459de606f5902c14cd0dd1ad4848567689f5ddd1ad9a0e024aa904cb593d3f95

Available in cache; verification: upstream_checksum
## Direct dependencies
- flutter: map[sdk:flutter]
- meta: ^1.3.0

## Package README (untrusted upstream documentation)
# 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:

```dart
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](https://pub.dev/packages/cross_file).

## Getting Started

For help getting started with Flutter, view our online
[documentation](http://flutter.io/).

For help on editing plugin code, view the [documentation](https://flutter.io/platform-plugins/#edit-code).
## Changelog
## 0.3.1

* Fix nullability of `XFileBase`'s `path` and `name` to match the
  implementations to avoid potential analyzer issues.

## 0.3.0

* Migrated package to null-safety.
* **breaking change** According to our unit tests, the API should be backwards-compatible. Some relevant changes were made, however:
  * Web: `lastModified` returns the epoch time as a default value, to maintain the `Future<DateTime>` return type (and not `null`)

## 0.2.1

* Prepare for breaking `package:http` change.

## 0.2.0

* **breaking change** Make sure the `saveTo` method returns a `Future` so it can be awaited and users are sure the file has been written to disk.

## 0.1.0+2

* Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276))

## 0.1.0+1

* Update Flutter SDK constraint.

## 0.1.0

* Initial open-source release.







 
