HiddenMediaController class

Coordinates "which chat bubble is currently being shown by a gallery and should hide its image." Maintains a stack of HideSlots so overlapping gallery screens (A's close-anim still running while B is pushed) don't clobber each other: A's release pops only A's slot, leaving B's bubble hidden until B itself releases.

Within one screen, swiping the pager calls update on the same slot so the hidden bubble follows the central item without churning the stack.

Mixed-in types
Available extensions

Properties

disposed → bool
Whether dispose has already run.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether there is at least one active listener.
no setterinherited
hidden → Object?
Currently-hidden source id (= top of stack), or null when nothing is hidden.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

acquire(Object id) → HideSlot
Push a new hide-slot. The owner must keep the returned HideSlot and pass it back to update / release.
addDispose(VoidCallback callback) → void
Registers a disposal callback. Ignored if already disposed.
inherited
addListener(VoidCallback listener) → void
Register a closure to be called when the object notifies its listeners.
inherited
clearForTest() → void
Drops every slot without notifying.
dispose() → void
Releases whatever this object holds. Calling it twice is an error.
inherited
disposeBy(Dispose disposer) → void

Available on Disposable, provided by the DisposableDisposerExtension extension

Adds this object's dispose to another Dispose collector.
isHidden(Object? id) → bool
Whether id is the hidden source.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Notifies all registered listeners.
inherited
release(HideSlot slot) → void
Pop slot from the stack. No-op if already released. When slot is the top, the previous slot's id (if any) becomes hidden again.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that the object notifies.
inherited
subscribe(VoidCallback callback) → VoidCallback

Available on Listenable, provided by the ListenableExtension extension

Adds callback as listener and returns a function to remove it.
toString() → String
A string representation of this object.
inherited
update(HideSlot slot, Object id) → void
Change slot's id (e.g. on pager swipe). No-op if the slot was already released.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance → HiddenMediaController
The one controller of the app.
final