Some<A> class

Represents an existing value of type A. It's a concrete implementation of Option.

Use Some to encapsulate an actual value, as opposed to None which represents the absence of a value.

Example:

final optionValue = Some(42);
print(optionValue.value);  // Outputs: 42
Inheritance

Constructors

Some(A value)
Constructs a Some instance encapsulating the provided value.

Properties

hashCode int
The hash code for this object.
read-onlyoverride
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
value → A
The encapsulated value of this Some instance.
final

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.
override