Updates size to be in bytes instead of kb (#573)
This commit is contained in:
parent
2b22841e82
commit
55127843c9
|
@ -1,3 +1,6 @@
|
|||
## 2.1.5
|
||||
Updates `size` property from `PlatformFile` to be in bytes instead of kb.
|
||||
|
||||
## 2.1.4
|
||||
iOS: Fixes iOS ViewController which is nil when UIWindow.rootViewController have changed. ([#525](https://github.com/miguelpruivo/flutter_file_picker/issues/525)). Thank you @devcxm.
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ public class FileUtils {
|
|||
fileInfo
|
||||
.withPath(path)
|
||||
.withName(fileName)
|
||||
.withSize(Integer.parseInt(String.valueOf(file.length()/1024)));
|
||||
.withSize(Integer.parseInt(String.valueOf(file.length())));
|
||||
|
||||
return fileInfo.build();
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
|
||||
[files addObject: [[[FileInfo alloc] initWithPath: path
|
||||
andName: [path lastPathComponent]
|
||||
andSize: [NSNumber numberWithLongLong: [@(fileAttributes.fileSize) longLongValue] / 1024]
|
||||
andSize: [NSNumber numberWithLongLong: [@(fileAttributes.fileSize) longLongValue]]
|
||||
andData: loadData ? [NSData dataWithContentsOfFile:path options: 0 error:nil] : nil] toData]];
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class PlatformFile {
|
|||
/// File content as stream
|
||||
final Stream<List<int>> readStream;
|
||||
|
||||
/// The file size in KB.
|
||||
/// The file size in bytes.
|
||||
final int size;
|
||||
|
||||
/// File extension for this file.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
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.
|
||||
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
|
||||
version: 2.1.4
|
||||
version: 2.1.5
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
|
|
Loading…
Reference in New Issue