WalrusFile class
Walrus file abstraction.
Mirrors the TS SDK's WalrusFile class from files/file.ts.
Wraps a WalrusFileReader to provide uniform access to file
contents regardless of the underlying data source.
Constructors
- WalrusFile({required WalrusFileReader reader})
- Create a WalrusFile from a custom reader.
-
WalrusFile.from({required Uint8List contents, required String identifier, Map<
String, String> ? tags}) -
Create a WalrusFile from in-memory data.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bytes(
) → Future< Uint8List> - Returns the raw bytes of the file.
-
getIdentifier(
) → Future< String?> -
Returns the file's identifier (e.g. filename), or
null. -
getTags(
) → Future< Map< String, String> > - Returns the file's tags.
-
json(
) → Future - Returns the file contents parsed as JSON.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
text(
) → Future< String> - Returns the file contents decoded as UTF-8 text.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited