DevRevMonitoredApp constructor
DevRevMonitoredApp({
- Key? key,
- GlobalKey<
ScaffoldMessengerState> ? scaffoldMessengerKey, - Widget? home,
- Map<
String, WidgetBuilder> routes = const <String, WidgetBuilder>{}, - String? initialRoute,
- RouteFactory? onGenerateRoute,
- InitialRouteListFactory? onGenerateInitialRoutes,
- RouteFactory? onUnknownRoute,
- Widget builder()?,
- String? title = '',
- GenerateAppTitle? onGenerateTitle,
- Color? color,
- ThemeData? theme,
- ThemeData? darkTheme,
- ThemeData? highContrastTheme,
- ThemeData? highContrastDarkTheme,
- ThemeMode? themeMode = ThemeMode.system,
- Duration themeAnimationDuration = kThemeAnimationDuration,
- Curve themeAnimationCurve = Curves.linear,
- Locale? locale,
- Iterable<
LocalizationsDelegate> ? localizationsDelegates, - LocaleListResolutionCallback? localeListResolutionCallback,
- LocaleResolutionCallback? localeResolutionCallback,
- Iterable<
Locale> supportedLocales = const <Locale>[Locale('en', 'US')], - bool debugShowMaterialGrid = false,
- bool showPerformanceOverlay = false,
- bool checkerboardRasterCacheImages = false,
- bool checkerboardOffscreenLayers = false,
- bool showSemanticsDebugger = false,
- bool debugShowCheckedModeBanner = true,
- Map<
ShortcutActivator, Intent> ? shortcuts, - Map<
Type, Action< ? actions,Intent> > - String? restorationScopeId,
- 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,
],
);