BeamerChildBackButtonDispatcher class
Overrides default back button behavior in ChildBackButtonDispatcher to do custom onBack or BeamerDelegate.beamBack.
- Inheritance
-
- Object
- BackButtonDispatcher
- ChildBackButtonDispatcher
- BeamerChildBackButtonDispatcher
Constructors
-
BeamerChildBackButtonDispatcher({required BeamerBackButtonDispatcher parent, required BeamerDelegate delegate, Future<
bool> onBack(BeamerDelegate delegate)?}) - Creates a BeamerChildBackButtonDispatcher with specified properties.
Properties
- alwaysBeamBack → bool
-
Whether to always do BeamerDelegate.beamBack when Android back button
is pressed, i.e. always go to previous route in navigation history
instead of trying to pop first.
final
- delegate → BeamerDelegate
-
A BeamerDelegate that belongs to the same Router/
Beamer
as this.final - fallbackToBeamBack → bool
-
Whether to try to use
beamBack()
when pop cannot be done.final - hasCallbacks → bool
-
Whether a callback is currently registered.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onBack
→ (Future<
bool> Function(BeamerDelegate delegate)?) -
A custom closure that has precedence over other behaviors.
final
- parent → BackButtonDispatcher
-
The back button dispatcher that this object will attempt to take priority
over when takePriority is called.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addCallback(
ValueGetter< Future< callback) → voidbool> > -
Register the callback to be called when the object changes.
inherited
-
createChildBackButtonDispatcher(
) → ChildBackButtonDispatcher -
Creates a ChildBackButtonDispatcher that is a direct descendant of this
back button dispatcher.
inherited
-
deferTo(
ChildBackButtonDispatcher child) → void -
Mark the given child as taking priority over this object and the other
children.
inherited
-
forget(
ChildBackButtonDispatcher child) → void -
Causes the given child to be removed from the list of children to which
this object might defer, as if deferTo had never been called for that
child.
inherited
-
invokeCallback(
Future< bool> defaultValue) → Future<bool> -
Handles a pop route request.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifiedByParent(
Future< bool> defaultValue) → Future<bool> -
The parent of this child back button dispatcher decide to let this
child to handle the invoke the callback request in
BackButtonDispatcher.invokeCallback.
inherited
-
removeCallback(
ValueGetter< Future< callback) → voidbool> > -
Remove a previously registered callback.
inherited
-
takePriority(
) → void -
Make this BackButtonDispatcher take priority among its peers.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited