File tree Expand file tree Collapse file tree 6 files changed +23
-9
lines changed
Expand file tree Collapse file tree 6 files changed +23
-9
lines changed Original file line number Diff line number Diff line change 1+ ## 4.0.1
2+
3+ - Add fallback for renamed methods.
4+
15## 4.0.0
26
37- ** BREAKING** Rename ` FileRASource.open ` to ` FileRASource.openPath ` .
Original file line number Diff line number Diff line change @@ -8,9 +8,19 @@ typedef PlatformFile = impl.PlatformFile;
88abstract class FileRASource extends RandomAccessSource {
99 /// Opens a [FileRASource] from a file path.
1010 static Future <FileRASource > openPath (String path) =>
11- impl.FileRASource .open (path);
11+ impl.FileRASource .openPath (path);
1212
1313 /// Loads a [FileRASource] from a [PlatformFile] .
1414 static Future <FileRASource > loadFile (PlatformFile file) =>
15- impl.FileRASource .load (file);
15+ impl.FileRASource .loadFile (file);
16+
17+ /// Opens a [FileRASource] from a file path.
18+ @Deprecated ('Renamed to openPath' )
19+ static Future <FileRASource > open (String path) =>
20+ impl.FileRASource .openPath (path);
21+
22+ /// Loads a [FileRASource] from a [PlatformFile] .
23+ @Deprecated ('Renamed to loadFile' )
24+ static Future <FileRASource > load (PlatformFile file) =>
25+ impl.FileRASource .loadFile (file);
1626}
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ import 'file_ra_source.dart' as base;
55typedef PlatformFile = Object ;
66
77abstract class FileRASource extends base .FileRASource {
8- static Future <FileRASource > open (String path) =>
8+ static Future <FileRASource > openPath (String path) =>
99 throw UnsupportedError ('Not supported on this platform.' );
1010
11- static Future <FileRASource > load (PlatformFile file) =>
11+ static Future <FileRASource > loadFile (PlatformFile file) =>
1212 throw UnsupportedError ('Not supported on this platform.' );
1313
1414 @override
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ class FileRASource extends base.FileRASource {
1010
1111 FileRASource ._(this ._file);
1212
13- static Future <FileRASource > open (String path) async =>
13+ static Future <FileRASource > openPath (String path) async =>
1414 FileRASource ._(await io.File (path).open ());
1515
16- static Future <FileRASource > load (PlatformFile file) async =>
16+ static Future <FileRASource > loadFile (PlatformFile file) async =>
1717 FileRASource ._(await file.open ());
1818
1919 @override
Original file line number Diff line number Diff line change @@ -16,13 +16,13 @@ class FileRASource extends base.FileRASource {
1616
1717 FileRASource ._(this ._bytes);
1818
19- static Future <base.FileRASource > open (String path) async {
19+ static Future <base.FileRASource > openPath (String path) async {
2020 final res = await _fetch (path.toJS).toDart;
2121 final bytes = (await res.bytes ().toDart).toDart;
2222 return FileRASource ._(BytesRASource (bytes));
2323 }
2424
25- static Future <FileRASource > load (PlatformFile file) async {
25+ static Future <FileRASource > loadFile (PlatformFile file) async {
2626 final bytes = (await file.arrayBuffer ().toDart).toDart.asUint8List ();
2727 return FileRASource ._(BytesRASource (bytes));
2828 }
Original file line number Diff line number Diff line change 11name : random_access_source
22description : A shared interface for common random access data.
3- version : 4.0.0
3+ version : 4.0.1
44repository : https://github.com/flutter-cavalry/random_access_source
55
66environment :
You can’t perform that action at this time.
0 commit comments