LoadResult<T> class

Load result containing the loaded bundle and any issues.

Constructors

LoadResult({T? value, required bool success, String? error, List<String> warnings = const [], Map<String, dynamic> metadata = const {}})
const
LoadResult.fail(String error, {List<String>? warnings})
Create a failed result.
factory
LoadResult.ok(T value, {List<String>? warnings})
Create a successful result.
factory

Properties

error String?
Error message if loading failed.
final
hashCode int
The hash code for this object.
no setterinherited
metadata Map<String, dynamic>
Loading metadata.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
success bool
Whether loading was successful.
final
value → T?
The loaded value.
final
warnings List<String>
Warning messages.
final

Methods

map<U>(U mapper(T)) LoadResult<U>
Map the value to a different type.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited