NavigatorExt extension

Extension on NavigatorState providing convenient navigation methods.

This extension simplifies common navigation operations by providing widget-based navigation methods with automatic route creation.

on

Methods

popUntilFirst<T>() → void

Available on NavigatorState, provided by the NavigatorExt extension

Pops routes until the first route (root route) is reached.
pushReplacementWidget<T>(Widget widget) Future<T?>

Available on NavigatorState, provided by the NavigatorExt extension

Replaces the current route with a new route containing the given widget.
pushWidget<T>(Widget widget) Future<T?>

Available on NavigatorState, provided by the NavigatorExt extension

Pushes a new route with the given widget onto the navigator.
removeUntilFirstAndPushReplacementWidget(Widget widget) → void

Available on NavigatorState, provided by the NavigatorExt extension

Removes all routes and pushes the given widget as the new root route.