navigate method
Override this method to implement your custom push action.
Access the NavigatorState with
ref.read(navigationProvider).key.currentState.
Implementation
@override
Future<R?> navigate() {
return ref
.read(navigationProvider)
.pushAndRemoveUntil<R>(
_widget,
removeUntil: _removeUntil,
transition: _transition,
);
}