From 87593fc7fbe1acc286fae065ca86f7397ea56aff Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 24 Feb 2021 21:26:48 -0500 Subject: [PATCH 1/3] [cross_file] Fix base class nullability --- packages/cross_file/CHANGELOG.md | 5 +++++ packages/cross_file/lib/src/types/base.dart | 4 ++-- packages/cross_file/pubspec.yaml | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/cross_file/CHANGELOG.md b/packages/cross_file/CHANGELOG.md index 5bbb43f9e882..94bf4b29322a 100644 --- a/packages/cross_file/CHANGELOG.md +++ b/packages/cross_file/CHANGELOG.md @@ -1,3 +1,8 @@ +## 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. diff --git a/packages/cross_file/lib/src/types/base.dart b/packages/cross_file/lib/src/types/base.dart index 2a59c1c2b246..4522b7343c9b 100644 --- a/packages/cross_file/lib/src/types/base.dart +++ b/packages/cross_file/lib/src/types/base.dart @@ -31,14 +31,14 @@ abstract class XFileBase { /// Accessing the data contained in the picked file by its path /// is platform-dependant (and won't work on web), so use the /// byte getters in the CrossFile instance instead. - String? get path { + String get path { throw UnimplementedError('.path has not been implemented.'); } /// The name of the file as it was selected by the user in their device. /// /// Use only for cosmetic reasons, do not try to use this as a path. - String? get name { + String get name { throw UnimplementedError('.name has not been implemented.'); } diff --git a/packages/cross_file/pubspec.yaml b/packages/cross_file/pubspec.yaml index 8e09b21d4536..66d3f46a84e3 100644 --- a/packages/cross_file/pubspec.yaml +++ b/packages/cross_file/pubspec.yaml @@ -1,7 +1,7 @@ name: cross_file description: An abstraction to allow working with files across multiple platforms. homepage: https://github.com/flutter/plugins/tree/master/packages/cross_file -version: 0.3.0 +version: 0.3.1 dependencies: flutter: From 7af44c37fd35a6f74178d413675d1b2eda2092a6 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 24 Feb 2021 21:51:05 -0500 Subject: [PATCH 2/3] Make it a breaking change --- packages/cross_file/CHANGELOG.md | 2 +- packages/cross_file/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cross_file/CHANGELOG.md b/packages/cross_file/CHANGELOG.md index 94bf4b29322a..6537f086ebe4 100644 --- a/packages/cross_file/CHANGELOG.md +++ b/packages/cross_file/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.3.1 +## 0.4.0 * Fix nullability of `XFileBase`'s `path` and `name` to match the implementations to avoid potential analyzer issues. diff --git a/packages/cross_file/pubspec.yaml b/packages/cross_file/pubspec.yaml index 66d3f46a84e3..bab80ff6c999 100644 --- a/packages/cross_file/pubspec.yaml +++ b/packages/cross_file/pubspec.yaml @@ -1,7 +1,7 @@ name: cross_file description: An abstraction to allow working with files across multiple platforms. homepage: https://github.com/flutter/plugins/tree/master/packages/cross_file -version: 0.3.1 +version: 0.4.0 dependencies: flutter: From 679fed0f43eac814fcdccd0564980eac0e40cfc4 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 24 Feb 2021 22:28:46 -0500 Subject: [PATCH 3/3] Revert "Make it a breaking change" This reverts commit 7af44c37fd35a6f74178d413675d1b2eda2092a6. --- packages/cross_file/CHANGELOG.md | 2 +- packages/cross_file/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cross_file/CHANGELOG.md b/packages/cross_file/CHANGELOG.md index 6537f086ebe4..94bf4b29322a 100644 --- a/packages/cross_file/CHANGELOG.md +++ b/packages/cross_file/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.4.0 +## 0.3.1 * Fix nullability of `XFileBase`'s `path` and `name` to match the implementations to avoid potential analyzer issues. diff --git a/packages/cross_file/pubspec.yaml b/packages/cross_file/pubspec.yaml index bab80ff6c999..66d3f46a84e3 100644 --- a/packages/cross_file/pubspec.yaml +++ b/packages/cross_file/pubspec.yaml @@ -1,7 +1,7 @@ name: cross_file description: An abstraction to allow working with files across multiple platforms. homepage: https://github.com/flutter/plugins/tree/master/packages/cross_file -version: 0.4.0 +version: 0.3.1 dependencies: flutter: