None<t extends Object?> class
- Inheritance
- Available extensions
Constructors
- None()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → SumRuntimeType
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
apply(
Maybe< T> arg) → Maybe<U> -
Available on Maybe<
Apply the argU Function(T)> , provided by the MaybeApply extensionarg
tothis
Function only in case both the arg and Function are available. -
bind<
T1> (Maybe< T1> f(t)) → Maybe<T1> -
Executes an mapping operation which is partial in case an value is present
and flattens the result into a single Maybe.
inherited
-
cast<
T1> () → Maybe< T1> -
Cast this Maybe<T> into an Maybe<T1>, throwing an TypeError if not
possible.
inherited
-
fillWhenNone(
t value) → Maybe< t> -
In case this is None, add the
value
, resulting in a Just, otherwise keep the current value.inherited -
filter(
bool predicate(t)) → Maybe< t> -
In case theres a value, keep it in case the
predicate
istrue
, otherwise return None.inherited -
filterNonNullable(
) → Maybe< T> -
Available on Maybe<
In case theres a value, keep it only if it is notT> , provided by the MaybeNonNullableE extensionnull
, otherwise return None. -
filterNonNullable(
) → Maybe< T> -
Available on Maybe<
In case theres a value, keep it only if it is notT?> , provided by the MaybeNullableE extensionnull
, otherwise return None. -
fmap<
B> (B fn(t p1)) → Maybe< B> -
inherited
-
lift<
A, B> (Maybe< B Function(A)> fn, Maybe<A> a) → Maybe<B> -
inherited
-
map<
T1> (T1 f(t)) → Maybe< T1> -
Executes an mapping operation in case an value is present and wraps it
with Just, otherwise returns None.
inherited
-
maybeFill(
Maybe< t> other) → Maybe<t> -
In case this is None, return
other
, otherwise keep the current value.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pure<
T1> (T1 value) → Maybe< T1> -
inherited
-
toEither<
L> ({L? l, L get()?}) → Either< L, T> -
Available on Maybe<
T> , provided by the MaybeToEither extension -
toList(
) → List< t> -
Convert this Maybe to an List, with None being an empty list and
Just being an list that contains just the value.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
unit<
T1> (T1 value) → Maybe< T1> -
inherited
-
valueOr(
t orElse) → t -
In case there is a value, retrieve it, otherwise return the
orElse
value.inherited -
valueOrElse(
t orElse) → t -
In case there is a value, retrieve it, otherwise return the
orElse
value.inherited -
valueOrGet(
t get()) → t -
In case there is a value, retrieve it, otherwise return the result of the
get
callback.inherited -
visit<
R extends Object?> ({required R just(t _value), required R none()}) → R -
override
-
where(
bool predicate(t)) → Maybe< t> -
In case theres a value, keep it in case the
predicate
istrue
, otherwise return None.inherited -
whereNotNull(
) → Maybe< T> -
Available on Maybe<
TransformsT> , provided by the MaybeNonNullableE extensionnull
into None In case theres a value, keep it only if it is notnull
, otherwise return None. -
whereNotNull(
) → Maybe< T> -
Available on Maybe<
In case theres a value, keep it only if it is notT?> , provided by the MaybeNullableE extensionnull
, otherwise return None.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
-
operator >>(
Maybe< T> arg) → Maybe<U> -
Available on Maybe<
Apply the argU Function(T)> , provided by the MaybeApply extensionarg
tothis
Function only in case both the arg and Function are available.