Go<T> class

A utility class for simplifying navigation in a Flutter app.

Constructors

Go(BuildContext context)
Creates a Go instance with the provided parameters.

Properties

context BuildContext
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

backWithData(T data) → void
Navigates back to the previous screen with provided data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onTapRecognizeGesture({String? routeName, Map<String, dynamic>? args}) TapGestureRecognizer
Sets up a tap gesture recognizer for the onTapRecognizeGesture method.
pop() → void
Pops the current route from the navigation stack.
popUntilNamedRoute({String? routeName, Map<String, dynamic>? args}) → void
Pops until a specific route is reached.
replaceWithNamedRoute({String? routeName, Map<String, dynamic>? args}) → void
Replaces the current route with a named route.
replaceWithNamedRouteWithArgs({String? routeName, Map<String, dynamic>? args}) → void
Replaces the current route with a named route and optional args.
to({String? routeName, Map<String, dynamic>? args}) → void
Navigates to the specified route with optional args.
toAndClearAll({String? routeName, Map<String, dynamic>? args}) → void
Navigates to the specified route and removes all other routes from the stack.
toAndClearAllNamedRoute({String? routeName, Map<String, dynamic>? args}) → void
Navigates to a new route and removes all previous routes from stack.
toAndClearAllReplacementNamedRoute({String? routeName, Map<String, dynamic>? args}) → void
Navigates to a new route, clearing all previous routes in stack.
toAndExpectData<T>({String? routeName, Map<String, dynamic>? args}) Future<T?>
Navigates to a named route and expects to receive data back.
toAndReplaceAllNamedRoute({String? routeName, Map<String, dynamic>? args}) → void
Navigates to a new route, replacing all previous routes in stack.
toNamedRouteWithArgs({String? routeName, Map<String, dynamic>? args}) → void
Navigates to a named route with specified args.
toString() String
A string representation of this object.
inherited

Operators

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