SimpleRouter class Null safety

Class responsable for doing the navigation

Constructors

SimpleRouter()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

The navigatorKey, this is a required one. Use the default or set your own key
read / write
onAfterPush ↔ (dynamic Function(Widget)?)
Middleware to be executed after the navigation
read / write
onBeforePush ↔ (dynamic Function(Widget)?)
Middleware to be executed before the navigation
read / write
useCupertinoTransition bool
bool value to set the use of cupertino transitions
read / write

Static Methods

back<T extends Object>([T? result]) → void
Back the navigation, it's similar with Navigator.of(context).pop()`
forward(Widget widget, {String? name}) Future
Forward navigation, it's similar to Navigator.of(context).push
forwardAndRemoveAll(Widget widget, {String? name}) Future
Forward navigation and remove all routes
forwardAndRemoveUntil(Widget widget, String route, {String? name}) Future
Forward navigation and remove all routes until, it's similar to Navigator.of(context).pushAndRemoveUntil
forwardAndReplace(Widget widget, {String? name}) Future
Forward navigation and replace current one, it's similar to Navigator.of(context).pushAndReplace
getKey() GlobalKey<NavigatorState>
Getter for navigatorKey
setKey(GlobalKey<NavigatorState> key) → void
Method to set you own navigatorKey