mirror of
https://github.com/flutter/packages.git
synced 2025-06-30 14:47:22 +08:00
[cross_file] Improved documentation about ignored parameters in IO module. (#4416)
Hello guys, following the discussion in the issue below here I've tried to document all the ignored constructor parameters that are available but never used in the IO module. - https://github.com/flutter/flutter/issues/87812
This commit is contained in:
@ -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.
|
||||
|
@ -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.');
|
||||
|
@ -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,
|
||||
|
@ -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"
|
||||
|
Reference in New Issue
Block a user