DevRevMonitoredApp.router constructor
DevRevMonitoredApp.router({
- Key? key,
- GlobalKey<
ScaffoldMessengerState> ? scaffoldMessengerKey, - RouterConfig<
Object> ? routerConfig, - RouteInformationProvider? routeInformationProvider,
- RouteInformationParser<
Object> ? routeInformationParser, - RouterDelegate<
Object> ? routerDelegate, - BackButtonDispatcher? backButtonDispatcher,
- 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.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,
);
},
);