DevRevMonitoredApp.router constructor

DevRevMonitoredApp.router({
  1. Key? key,
  2. GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey,
  3. RouterConfig<Object>? routerConfig,
  4. RouteInformationProvider? routeInformationProvider,
  5. RouteInformationParser<Object>? routeInformationParser,
  6. RouterDelegate<Object>? routerDelegate,
  7. BackButtonDispatcher? backButtonDispatcher,
  8. Widget builder(
    1. BuildContext,
    2. Widget?
    )?,
  9. String? title,
  10. GenerateAppTitle? onGenerateTitle,
  11. Color? color,
  12. ThemeData? theme,
  13. ThemeData? darkTheme,
  14. ThemeData? highContrastTheme,
  15. ThemeData? highContrastDarkTheme,
  16. ThemeMode? themeMode = ThemeMode.system,
  17. Duration themeAnimationDuration = kThemeAnimationDuration,
  18. Curve themeAnimationCurve = Curves.linear,
  19. Locale? locale,
  20. Iterable<LocalizationsDelegate>? localizationsDelegates,
  21. LocaleListResolutionCallback? localeListResolutionCallback,
  22. LocaleResolutionCallback? localeResolutionCallback,
  23. Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')],
  24. bool debugShowMaterialGrid = false,
  25. bool showPerformanceOverlay = false,
  26. bool checkerboardRasterCacheImages = false,
  27. bool checkerboardOffscreenLayers = false,
  28. bool showSemanticsDebugger = false,
  29. bool debugShowCheckedModeBanner = true,
  30. Map<ShortcutActivator, Intent>? shortcuts,
  31. Map<Type, Action<Intent>>? actions,
  32. String? restorationScopeId,
  33. bool useInheritedMediaQuery = false,
})

Implementation

DevRevMonitoredApp.router({
  super.key,
  super.scaffoldMessengerKey,
  super.routerConfig,
  super.routeInformationProvider,
  super.routeInformationParser,
  super.routerDelegate,
  super.backButtonDispatcher,
  Widget Function(BuildContext, Widget?)? builder,
  super.title,
  super.onGenerateTitle,
  super.color,
  super.theme,
  super.darkTheme,
  super.highContrastTheme,
  super.highContrastDarkTheme,
  super.themeMode,
  super.themeAnimationDuration,
  super.themeAnimationCurve,
  super.locale,
  super.localizationsDelegates,
  super.localeListResolutionCallback,
  super.localeResolutionCallback,
  super.supportedLocales,
  super.debugShowMaterialGrid,
  super.showPerformanceOverlay,
  super.checkerboardRasterCacheImages,
  super.checkerboardOffscreenLayers,
  super.showSemanticsDebugger,
  super.debugShowCheckedModeBanner,
  super.shortcuts,
  super.actions,
  super.restorationScopeId,
  // Kept for backward compatibility with older Flutter versions, but not passed to super
  // to avoid deprecation warnings in Flutter 3.7.0+ (parameter is ignored by MaterialApp)
  bool useInheritedMediaQuery = false,
}) : super.router(
        builder: (context, child) {
          Widget content = builder != null
              ? builder(context, child)
              : child ?? const SizedBox.shrink();
          return NotificationListener<ScrollNotification>(
            onNotification: (notification) {
              if (notification is ScrollStartNotification) {
                DevRev.updateTransitioningState(true);
              } else if (notification is ScrollEndNotification) {
                DevRev.updateTransitioningState(false);
              }
              return false;
            },
            child: content,
          );
        },
      );