onGenerateRoute static method

Route? onGenerateRoute(
  1. RouteSettings routeSettings
)

Implementation

static Route? onGenerateRoute(RouteSettings routeSettings) {
  switch (routeSettings.name) {
    case PaymentMethodsScreen.id:
      return MaterialPageRoute(builder: (_) => const PaymentMethodsScreen());

    default:
      return null;
  }
}