GetMiddleware class abstract
Middleware to handle page lifecycle events in a prioritized manner.
Functions are called in this order:
redirect -> onPageCalled -> onBindingsStart -> onPageBuildStart -> onPageBuilt -> onPageDispose
Constructors
- GetMiddleware.new({int priority = 0})
-
Creates a middleware with a given priority.
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onBindingsStart<
R> (List< R> ? bindings) → List<R> ? - Called before BindingsInterface initialization. Can modify bindings.
-
onPageBuildStart(
GetPageBuilder? page) → GetPageBuilder? - Called before the page builder executes.
-
onPageBuilt(
Widget page) → Widget - Called after the page builder executes.
-
onPageCalled(
GetPage? page) → GetPage? - Called when a page is accessed. Can modify the GetPage.
-
onPageDispose(
) → void - Called when the page is disposed.
-
redirect(
String? route) → RouteSettings? - Called when searching for a route. Can return a new RouteSettings to redirect.
-
redirectDelegate(
RouteDecoder route) → FutureOr< RouteDecoder?> - Called when the router delegate changes the current route.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited