push<T> method
Pushes a new route onto the navigator.
Implementation
Future<T?> push<T>(Widget widget) async {
final result = await _key.currentState?.push<T>(
MaterialPageRoute(
builder: (_) => widget,
settings: RouteSettings(name: widget.runtimeType.toString()),
),
);
return result;
}