Maybe<T> class
Constructors
- Maybe.nothing()
- Maybe.some(T? _value, {bool nullable = false, bool nothingWhen(T? value)?})
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
flatMap<
E> (dynamic f) → Maybe< E> -
map(
dynamic f) → Maybe< T> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unwrap(
) → T?
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
count<
E> (Iterable< Maybe< ? maybeList) → intE> > -
filter<
E> (Iterable< Maybe< ? maybeIterable) → Iterable<E> >E> -
flatten<
E> (Maybe< Maybe< ? maybe) → Maybe<E> >E> -
forEach<
E> (Iterable< Maybe< ? maybeIterable, void f(E element)) → voidE> > -
isNothing<
T> (Maybe< T> maybe) → bool -
isSome<
T> (Maybe< T> maybe) → bool -
mapSome<
T, U> (Maybe< T> maybe, U converter(T v)) → Maybe<U> -
someFrom<
T> (Maybe< T> maybe, T defaultValue) → T -
when<
T> (Maybe< T> maybe, {MaybeNothing? nothing, MaybeSome<T?> ? some, MaybeDefault<T> ? defaultValue}) → void