app method

  1. @override
Widget app({
  1. Key? key,
  2. GlobalKey<NavigatorState>? navigatorKey,
  3. GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey,
  4. String? initialRoute,
  5. RouteFactory? onGenerateRoute,
  6. RouteFactory? onUnknownRoute,
  7. required String title,
})
override

Implementation

@override
Widget app(
    {Key? key,
    GlobalKey<NavigatorState>? navigatorKey,
    GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey,
    String? initialRoute,
    RouteFactory? onGenerateRoute,
    RouteFactory? onUnknownRoute,
    required String title}) {
  return MaterialApp(
    key: key,
    debugShowCheckedModeBanner: false,
    navigatorKey: navigatorKey,
    scaffoldMessengerKey: scaffoldMessengerKey,
    initialRoute: initialRoute,
    onGenerateRoute: onGenerateRoute,
    onUnknownRoute: onUnknownRoute,
    title: title,
  );

  // on apple we would possibly use:
/*
  return CupertinoApp(
  localizationsDelegates: [
  DefaultMaterialLocalizations.delegate,
  DefaultCupertinoLocalizations.delegate,
  DefaultWidgetsLocalizations.delegate,
],
    debugShowCheckedModeBanner: false,
    navigatorKey: navigatorKey,
    initialRoute: initialRoute,
    onGenerateRoute: onGenerateRoute,
    onUnknownRoute: onUnknownRoute,
    title: title,
  );
*/
}