Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[cross_file] Fix base class nullability #3629

Merged
merged 3 commits into from
Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/cross_file/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions packages/cross_file/lib/src/types/base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}

Expand Down
2 changes: 1 addition & 1 deletion packages/cross_file/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down