navigateToPage<T> method

Future<T> navigateToPage<T>(
  1. Widget destination, {
  2. Object? argument,
})

Implementation

Future<T> navigateToPage<T>(Widget destination, {Object? argument}) async {
  return await _navigatorKey.currentState?.push(CupertinoPageRoute(
      builder: (context) => destination,
      settings: RouteSettings(
          name: destination.runtimeType.toString(), arguments: argument)));
}