diff --git a/packages/cross_file/CHANGELOG.md b/packages/cross_file/CHANGELOG.md index 9f5b06bc609..3a81184d253 100644 --- a/packages/cross_file/CHANGELOG.md +++ b/packages/cross_file/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.3+6 + +* Improves documentation about ignored parameters in IO implementation. + ## 0.3.3+5 * Adds pub topics to package metadata. diff --git a/packages/cross_file/lib/src/types/base.dart b/packages/cross_file/lib/src/types/base.dart index cf10e70055c..6212f4ec762 100644 --- a/packages/cross_file/lib/src/types/base.dart +++ b/packages/cross_file/lib/src/types/base.dart @@ -38,6 +38,8 @@ abstract class XFileBase { /// The name of the file as it was selected by the user in their device. /// + /// For non-web implementation, this represents the last part of the filesystem path. + /// /// Use only for cosmetic reasons, do not try to use this as a path. String get name { throw UnimplementedError('.name has not been implemented.'); diff --git a/packages/cross_file/lib/src/types/io.dart b/packages/cross_file/lib/src/types/io.dart index 597a2f8b69e..fc34d496669 100644 --- a/packages/cross_file/lib/src/types/io.dart +++ b/packages/cross_file/lib/src/types/io.dart @@ -17,6 +17,13 @@ class XFile extends XFileBase { /// [bytes] is ignored; the parameter exists only to match the web version of /// the constructor. To construct a dart:io XFile from bytes, use /// [XFile.fromData]. + /// + /// [name] is ignored; the parameter exists only to match the web version of + /// the constructor. + /// + /// [length] is ignored; the parameter exists only to match the web version of + /// the constructor. + /// // ignore: use_super_parameters XFile( String path, { @@ -32,6 +39,9 @@ class XFile extends XFileBase { super(path); /// Construct an CrossFile from its data + /// + /// [name] is ignored; the parameter exists only to match the web version of + /// the constructor. XFile.fromData( Uint8List bytes, { String? mimeType, diff --git a/packages/cross_file/pubspec.yaml b/packages/cross_file/pubspec.yaml index a942dc8c766..79067789365 100644 --- a/packages/cross_file/pubspec.yaml +++ b/packages/cross_file/pubspec.yaml @@ -2,7 +2,7 @@ name: cross_file 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.3+5 +version: 0.3.3+6 environment: sdk: ">=2.19.0 <4.0.0"