Fix null PlatformFIle.extension error when called on Web
This commit is contained in:
parent
7f8d801a81
commit
d2d4de7bf8
|
@ -1,3 +1,6 @@
|
||||||
|
## 2.0.13
|
||||||
|
Updates `extension` helper getter to use the `name` property instead of `path`, since the latest isn't available on the Web, hence, the extension wouldn't be as well. Thank you @markgrancapal.
|
||||||
|
|
||||||
## 2.0.12
|
## 2.0.12
|
||||||
Android:
|
Android:
|
||||||
|
|
||||||
|
|
|
@ -32,5 +32,5 @@ class PlatformFile {
|
||||||
final int size;
|
final int size;
|
||||||
|
|
||||||
/// File extension for this file.
|
/// File extension for this file.
|
||||||
String get extension => path?.split('.')?.last;
|
String get extension => name?.split('.')?.last;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
name: file_picker
|
name: file_picker
|
||||||
description: A package that allows you to use a native file explorer to pick single or multiple absolute file paths, with extension filtering support.
|
description: A package that allows you to use a native file explorer to pick single or multiple absolute file paths, with extension filtering support.
|
||||||
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
|
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
|
||||||
version: 2.0.12
|
version: 2.0.13
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
|
|
Loading…
Reference in New Issue