None<T> class

Implemented types

Constructors

None()
const

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 /(dynamic a) → dynamic
Returns None or throws an error if it is Some Convinient operator to get the error from the result, user should ensure that the value is None, otherwise it will throw an UnimplementedError Usage: final res = Option.none(); final err = res / 0; assert(err is None);
override
operator ==(Object other) bool
The equality operator.
inherited
operator |(dynamic _) → T
Returns the Value if it is Some or throws an error if it is None Convinient operator to get the value from the result, user should ensure that the result is Some, otherwise it will throw an UnimplementedError Usage: final res = Option
override
operator ~() None
Returns the inner Value from Some or None Convinient operator to get the inner value from the Option, Usage: final res = Option
override