SwiftFlutterMaterial constructor

const SwiftFlutterMaterial({
  1. Key? key,
  2. required String initialRoute,
  3. String? homeRoute,
  4. Map<String, WidgetBuilder>? routes,
  5. Map<String, Widget Function(BuildContext, Map<String, dynamic>)>? routesWithPayload,
  6. NotificationRouteCallback? onNotificationLaunch,
  7. VoidCallback? onBackFromNotification,
  8. String? title,
  9. ThemeData? theme,
  10. ThemeData? darkTheme,
  11. ThemeMode? themeMode,
  12. bool? debugShowCheckedModeBanner,
  13. Widget builder(
    1. BuildContext,
    2. Widget?
    )?,
})

Implementation

const SwiftFlutterMaterial({
  super.key,
  required this.initialRoute,
  this.homeRoute,
  this.routes,
  this.routesWithPayload,
  this.onNotificationLaunch,
  this.onBackFromNotification,
  this.title,
  this.theme,
  this.darkTheme,
  this.themeMode,
  this.debugShowCheckedModeBanner,
  this.builder,
}) : assert(
        routes != null || routesWithPayload != null,
        'Either routes or routesWithPayload must be provided',
      );