Skip to content

Commit 3904abd

Browse files
committed
Update doc
1 parent 7138982 commit 3904abd

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,7 @@ abstract class RandomAccessSource {
5050
Implementations:
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`.

lib/src/bytes_ra_source.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
}

lib/src/file_ra_source.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ import 'file_ra_source_stub.dart'
66
typedef PlatformFile = impl.PlatformFile;
77

88
abstract 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
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: random_access_source
22
description: A shared interface for common random access data.
3-
version: 3.1.0
3+
version: 3.1.1
44
repository: https://github.com/flutter-cavalry/random_access_source
55

66
environment:

0 commit comments

Comments
 (0)