Availability class
The availability of the update.
An update may be available or not, which will be represented with UpdateAvailable and NoUpdateAvailable, respectively. Finally, if the process couldn't determine if a update is available or not, an UnknownAvailability will be yielded.
To check against the status, the recommended way is to use fold or
foldElse, as they are safest than comparing with if
, because it forces
you to provide every possible case.
- Annotations
-
- @immutable
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
-
fold<
T> ({required T available(), required T notAvailable(), required T unknown()}) → T - Returns a value based on the Availability.
-
foldElse<
T> ({T available()?, T notAvailable()?, T unknown()?, required T orElse()}) → T - Returns a value based on the Availability, non-exhaustively.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited