[cross_file] Remove unneeded flutter dependency. (#1712)
diff --git a/packages/cross_file/CHANGELOG.md b/packages/cross_file/CHANGELOG.md
index edf7631..76745fe 100644
--- a/packages/cross_file/CHANGELOG.md
+++ b/packages/cross_file/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.3.3
+
+* Removes unused Flutter dependencies.
+
## 0.3.2
* Improve web implementation so it can stream larger files.
diff --git a/packages/cross_file/README.md b/packages/cross_file/README.md
index e82ad95..3bbca28 100644
--- a/packages/cross_file/README.md
+++ b/packages/cross_file/README.md
@@ -43,3 +43,22 @@
[![Data on Global support for Blob constructing](https://caniuse.bitsofco.de/image/blobbuilder.png)](https://caniuse.com/blobbuilder)
[![Data on Global support for Blob URLs](https://caniuse.bitsofco.de/image/bloburls.png)](https://caniuse.com/bloburls)
+
+## Testing
+
+This package supports both web and native platforms. Unit tests need to be split
+in two separate suites (because native code cannot use `dart:html`, and web code
+cannot use `dart:io`).
+
+When adding new features, it is likely that tests need to be added for both the
+native and web platforms.
+
+### Native tests
+
+Tests for native platforms are located in the `x_file_io_test.dart`. Tests can
+be run with `dart test`.
+
+### Web tests
+
+Tests for the web platform live in the `x_file_html_test.dart`. They can be run
+with `dart test -p chrome`.
diff --git a/packages/cross_file/pubspec.yaml b/packages/cross_file/pubspec.yaml
index 13aebdb..53420a3 100644
--- a/packages/cross_file/pubspec.yaml
+++ b/packages/cross_file/pubspec.yaml
@@ -2,18 +2,14 @@
description: An abstraction to allow working with files across multiple platforms.
repository: https://github.com/flutter/packages/tree/main/packages/cross_file
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+cross_file%22
-version: 0.3.2
+version: 0.3.3
environment:
sdk: ">=2.12.0 <3.0.0"
- flutter: ">=1.22.0"
dependencies:
- flutter:
- sdk: flutter
js: ^0.6.3
meta: ^1.3.0
dev_dependencies:
- flutter_test:
- sdk: flutter
+ test: ^1.21.1
diff --git a/packages/cross_file/test/x_file_html_test.dart b/packages/cross_file/test/x_file_html_test.dart
index 8bfb605..593f5b2 100644
--- a/packages/cross_file/test/x_file_html_test.dart
+++ b/packages/cross_file/test/x_file_html_test.dart
@@ -9,8 +9,8 @@
import 'dart:typed_data';
import 'package:cross_file/cross_file.dart';
-import 'package:flutter_test/flutter_test.dart';
import 'package:js/js_util.dart' as js_util;
+import 'package:test/test.dart';
const String expectedStringContents = 'Hello, world! I ❤ ñ! 空手';
final Uint8List bytes = Uint8List.fromList(utf8.encode(expectedStringContents));
diff --git a/packages/cross_file/test/x_file_io_test.dart b/packages/cross_file/test/x_file_io_test.dart
index eb42871..fd7c9a6 100644
--- a/packages/cross_file/test/x_file_io_test.dart
+++ b/packages/cross_file/test/x_file_io_test.dart
@@ -9,7 +9,7 @@
import 'dart:typed_data';
import 'package:cross_file/cross_file.dart';
-import 'package:flutter_test/flutter_test.dart';
+import 'package:test/test.dart';
final String pathPrefix =
Directory.current.path.endsWith('test') ? './assets/' : './test/assets/';