DevRevMonitoredApp constructor

DevRevMonitoredApp({
  1. Key? key,
  2. GlobalKey<NavigatorState>? navigatorKey,
  3. GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey,
  4. Widget? home,
  5. Map<String, WidgetBuilder> routes = const <String, WidgetBuilder>{},
  6. String? initialRoute,
  7. RouteFactory? onGenerateRoute,
  8. InitialRouteListFactory? onGenerateInitialRoutes,
  9. RouteFactory? onUnknownRoute,
  10. List<NavigatorObserver> navigatorObservers = const [],
  11. Widget builder(
    1. BuildContext,
    2. Widget?
    )?,
  12. String? title = '',
  13. GenerateAppTitle? onGenerateTitle,
  14. Color? color,
  15. ThemeData? theme,
  16. ThemeData? darkTheme,
  17. ThemeData? highContrastTheme,
  18. ThemeData? highContrastDarkTheme,
  19. ThemeMode? themeMode = ThemeMode.system,
  20. Duration themeAnimationDuration = kThemeAnimationDuration,
  21. Curve themeAnimationCurve = Curves.linear,
  22. Locale? locale,
  23. Iterable<LocalizationsDelegate>? localizationsDelegates,
  24. LocaleListResolutionCallback? localeListResolutionCallback,
  25. LocaleResolutionCallback? localeResolutionCallback,
  26. Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')],
  27. bool debugShowMaterialGrid = false,
  28. bool showPerformanceOverlay = false,
  29. bool checkerboardRasterCacheImages = false,
  30. bool checkerboardOffscreenLayers = false,
  31. bool showSemanticsDebugger = false,
  32. bool debugShowCheckedModeBanner = true,
  33. Map<ShortcutActivator, Intent>? shortcuts,
  34. Map<Type, Action<Intent>>? actions,
  35. String? restorationScopeId,
  36. bool useInheritedMediaQuery = false,
})

Implementation

DevRevMonitoredApp({
  super.key,
  super.navigatorKey,
  super.scaffoldMessengerKey,
  super.home,
  super.routes,
  super.initialRoute,
  super.onGenerateRoute,
  super.onGenerateInitialRoutes,
  super.onUnknownRoute,
  List<NavigatorObserver> navigatorObservers = const [],
  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,
  bool useInheritedMediaQuery = false,
}) : super(
       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,
         );
       },
       navigatorObservers: [
         _TransitionTrackingObserver(),
         ...navigatorObservers,
       ],
     );