CustomNavigation class

A utility class for handling navigation actions within the Flutter app.

This class centralizes navigation logic, providing simple static methods to push, replace, and pop routes. It supports both Material and Cupertino style page transitions, which can be toggled via the isCupertinoPush flag.

Constructors

CustomNavigation()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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 Methods

pop<T extends Object?>(BuildContext context, [T? result]) Future
Pops the top-most route off the navigator.
popUntil<T extends Object?>(BuildContext context, RoutePredicate predicate) Future
Pops routes until the predicate returns true.
push(BuildContext context, {required Widget screen, bool isCupertinoPush = true}) Future
Pushes a new route onto the navigation stack.
pushAndRemoveUntil({required BuildContext context, required Widget screen, bool isCupertinoPush = true}) Future
Pushes a new route and removes all previous routes from the stack.
pushReplacement({required BuildContext context, required Widget screen, bool isCupertinoPush = true}) Future
Replaces the current route with a new one.