Some<TValue> class final

Some is a type that contains a value of type TValue.

Inheritance
Annotations

Constructors

Some.new(TValue value)
const

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → TValue
final

Methods

map<T>({required T onSome(TValue value), required T onNone()}) → T
Maps the Option to a new Option based on the provided onSome and onNone functions.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onNone(void onNone()) Option<TValue>
Calls the provided onNone function if the Option is a None instance.
inherited
onSome(void onSome(TValue value)) Option<TValue>
Calls the provided onSome function if the Option is a Some instance.
inherited
toString() String
A string representation of this object.
override

Operators

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