UpdateStatus class
An immutable snapshot of what an UpdateChecker knows.
- Annotations
Constructors
- UpdateStatus({required UpdateState state, String? runningBuildId, BuildInfo? latest, Object? error, DateTime? checkedAt, bool checking = false})
-
Creates a status snapshot.
const
Properties
- checkedAt → DateTime?
-
When the last check finished (successfully or not).
final
- checking → bool
-
Whether a check is in flight right now.
final
- error → Object?
-
The error of the most recent check, if it failed. Also set while
state stays UpdateState.updateAvailable after a later check failed.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isUpdateAvailable → bool
-
Whether a different build is available on the server.
no setter
- latest → BuildInfo?
-
The build the server reported on the last successful check.
final
- runningBuildId → String?
-
The build ID of the bundle running in this tab, if stamped.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → UpdateState
-
The current state.
final
Methods
-
copyWith(
{UpdateState? state, String? runningBuildId, BuildInfo? latest, Object? error, bool clearError = false, DateTime? checkedAt, bool? checking}) → UpdateStatus -
Returns a copy with the given fields replaced. Pass
clearError: trueto droperror. -
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.
override