Results class

Utility functions for working with Results

Constructors

Results()

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

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

Static Methods

catching<T>(T action()) Result<T, Exception>
Executes a function and catches any exceptions, returning them as failures
catchingAsync<T>(Future<T> action()) Future<Result<T, Exception>>
Executes an async function and catches any exceptions, returning them as failures
combine<T, E extends Object>(List<Result<T, E>> results) Result<List<T>, E>
Combines multiple Results into a single Result containing a list
fromNullable<T>(T? value, String error) Result<T, String>
Converts a nullable value to a Result