OnlineStatusStream class final Connectivity & lifecycle
The OnlineStatus.stream variant: a starting assumption and a stream of changes.
Usually written as OnlineStatus.stream(changes, initial: …); the class
is public so a switch over an OnlineStatus can name it.
- Inheritance
-
- Object
- OnlineStatus
- OnlineStatusStream
Constructors
-
OnlineStatusStream(Stream<
bool> changes, {required bool initial}) -
Follows
changesfrominitial.const
Properties
-
changes
→ Stream<
bool> -
Every later change. A broadcast stream always works. A
single-subscription one works as long as exactly one provider listens
to it exactly once: a provider keeps its one subscription across
rebuilds and client switches, but a provider remounted with the same
status, two providers given it, or one switched away from it and back
each listen again — and a second
listenfails with aFlutterErrorthat says so. When in doubt, passstream.asBroadcastStream().final - hashCode → int
-
The hash code for this object.
no setteroverride
- initial → bool
-
What to assume until changes has said anything.
final
- 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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override