File tree Expand file tree Collapse file tree 4 files changed +7
-1
lines changed
Expand file tree Collapse file tree 4 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -50,4 +50,7 @@ abstract class RandomAccessSource {
5050Implementations:
5151
5252- ` BytesRASource ` for ` Uint8List ` .
53+ - ` BytesRASource(Uint8List bytes) ` : creates a ` BytesRASource ` from the given ` bytes ` .
5354- ` FileRASource ` for ` RandomAccessFile ` (` dart:io ` ) and ` Blob ` (` package:web ` ).
55+ - ` await FileRASource.open(path) ` : Opens a ` FileRASource ` from a file path.
56+ - ` await FileRASource.load(file) ` : Loads a ` FileRASource ` from a ` PlatformFile ` .
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ class BytesRASource extends RandomAccessSource {
77
88 Uint8List get bytes => _syncSource._bytes;
99
10+ /// Creates a [BytesRASource] from the given [bytes] .
1011 BytesRASource (Uint8List bytes) {
1112 _syncSource = SyncBytesRASource (bytes);
1213 }
Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ import 'file_ra_source_stub.dart'
66typedef PlatformFile = impl.PlatformFile ;
77
88abstract class FileRASource extends RandomAccessSource {
9+ /// Opens a [FileRASource] from a file path.
910 static Future <FileRASource > open (String path) => impl.FileRASource .open (path);
1011
12+ /// Loads a [FileRASource] from a [PlatformFile] .
1113 static Future <FileRASource > load (PlatformFile file) =>
1214 impl.FileRASource .load (file);
1315}
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 : 3.1.0
3+ version : 3.1.1
44repository : https://github.com/flutter-cavalry/random_access_source
55
66environment :
You can’t perform that action at this time.
0 commit comments