ConnectivityState class sealed

Sealed state hierarchy for the connectivity feature.

Using sealed classes gives us exhaustive pattern matching at compile time. No more missed cases in switch statements.

Implementers
Available extensions

Properties

hashCode int
The hash code for this object.
no setterinherited
isOnline bool

Available on ConnectivityState, provided by the ConnectivityStateX extension

Whether the current state represents an active internet connection.
no setter
resultOrNull ConnectivityResultModel?

Available on ConnectivityState, provided by the ConnectivityStateX extension

Safe accessor — returns null when not in ConnectivityLoaded state.
no setter
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 ==(Object other) bool
The equality operator.
inherited