HarborFleetObserver class abstract
Hears harbors join and leave a HarborFleet, as a NavigatorObserver
hears routes come and go.
Register one with HarborSea(observers:), or with
HarborFleet.addObserver on a fleet you already have
(Harbor.of(context).fleet). Both methods do nothing unless overridden.
A harbor joins as it is first built, in the middle of a frame, so both
events are delivered after that frame, in the order they happened: by
then a harbor that joined has laid out, and HarborChart.nearest or
HarborChart.snapshotOf(harbor.fleet) can read where it is. A harbor that
joins and leaves within one frame is reported to nobody. Harbors already
in the fleet when an observer is added are not replayed: read
HarborFleet.harbors for those.
See also:
NavigatorObserver, the model for this one.HarborChart.snapshotAll, every live harbor of every sea at once.
Constructors
- HarborFleetObserver()
-
Const so that subclasses can be const.
const
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
-
didJoin(
HarborController harbor) → void -
harborhas joined the fleet: a page, a sheet, a dialog or a harbor inside one has been built. -
didLeave(
HarborController harbor) → void -
harborhas left the fleet: it was removed from the tree. Its handle no longer changes anything. -
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