push<T extends Widget> method
navigate to a new screen
Example Usage: PulseXNavigator navigator = PulseXNavigator(); navigator.push(ExampleView());
Implementation
Future<Object?>? push<T extends Widget>(T route) {
BuildContext? context = navigatorKey.currentState?.context;
assert(context != null, PulseXErrors.contextNotFoundError());
return navigatorKey.currentState?.push(
PulseXRoute(
builder: (_) => route,
),
);
}