BackButtonHandler class

Handles the system back button/gesture.

Constructors

BackButtonHandler({required GoRouter router})

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

addInterceptor(bool interceptor()) → void
interceptor returning true means back navigation is considered handled.
addPeekInterceptor(bool interceptor()) → void
checkInterceptors() → bool
Called from didPopRoute before canPop().
dispose() → void
Called on MultilevelNavigatorScope dispose.
handleBackButton() → Future<bool>
Returns true if the back press was handled, false if the app should close.
handlePathNavigation(String currentPath) → Future<bool>
Level4 -> level3 -> level2 -> level1 (feature home) -> close the app.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeInterceptor(bool interceptor()) → void
removePeekInterceptor(bool interceptor()) → void
toString() → String
A string representation of this object.
inherited
wouldIntercept() → bool
Side-effect-free — safe to call from handleStartBackGesture.

Operators

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