AppViewState<T extends StatefulWidget> constructor

AppViewState<T extends StatefulWidget>({
  1. AppController? con,
  2. List<ControllerMVC>? controllers,
  3. Object? object,
  4. GlobalKey<NavigatorState>? navigatorKey,
  5. RouteInformationProvider? routeInformationProvider,
  6. RouteInformationParser<Object>? routeInformationParser,
  7. RouterDelegate<Object>? routerDelegate,
  8. BackButtonDispatcher? backButtonDispatcher,
  9. GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey,
  10. Map<String, WidgetBuilder>? routes,
  11. String? initialRoute,
  12. RouteFactory? onGenerateRoute,
  13. RouteFactory? onUnknownRoute,
  14. List<NavigatorObserver>? navigatorObservers,
  15. TransitionBuilder? builder,
  16. String? title,
  17. GenerateAppTitle? onGenerateTitle,
  18. Color? color,
  19. ThemeData? theme,
  20. CupertinoThemeData? iOSTheme,
  21. ThemeData? darkTheme,
  22. ThemeMode? themeMode,
  23. Locale? locale,
  24. Iterable<LocalizationsDelegate>? localizationsDelegates,
  25. LocaleListResolutionCallback? localeListResolutionCallback,
  26. LocaleResolutionCallback? localeResolutionCallback,
  27. Iterable<Locale>? supportedLocales,
  28. bool? debugShowMaterialGrid,
  29. bool? showPerformanceOverlay,
  30. bool? checkerboardRasterCacheImages,
  31. bool? checkerboardOffscreenLayers,
  32. bool? showSemanticsDebugger,
  33. bool? debugShowWidgetInspector,
  34. bool? debugShowCheckedModeBanner,
  35. Map<LogicalKeySet, Intent>? shortcuts,
  36. Map<Type, Action<Intent>>? actions,
  37. String? restorationScopeId,
  38. ScrollBehavior? scrollBehavior,
  39. bool? debugPaintSizeEnabled,
  40. bool? debugPaintBaselinesEnabled,
  41. bool? debugPaintPointersEnabled,
  42. bool? debugPaintLayerBordersEnabled,
  43. bool? debugRepaintRainbowEnabled,
  44. FlutterExceptionHandler? errorHandler,
  45. ErrorWidgetBuilder? errorScreen,
  46. ReportErrorHandler? errorReport,
})

Implementation

AppViewState({
  this.con,
  List<ControllerMVC>? controllers,
  Object? object,
  this.navigatorKey,
  this.routeInformationProvider,
  this.routeInformationParser,
  this.routerDelegate,
  this.backButtonDispatcher,
  this.scaffoldMessengerKey,
  this.routes,
  this.initialRoute,
  this.onGenerateRoute,
  this.onUnknownRoute,
  this.navigatorObservers,
  this.builder,
  this.title,
  this.onGenerateTitle,
  this.color,
  this.theme,
  this.iOSTheme,
  this.darkTheme,
  this.themeMode,
  this.locale,
  this.localizationsDelegates,
  this.localeListResolutionCallback,
  this.localeResolutionCallback,
  this.supportedLocales,
  this.debugShowMaterialGrid,
  this.showPerformanceOverlay,
  this.checkerboardRasterCacheImages,
  this.checkerboardOffscreenLayers,
  this.showSemanticsDebugger,
  this.debugShowWidgetInspector,
  this.debugShowCheckedModeBanner,
  this.shortcuts,
  this.actions,
  this.restorationScopeId,
  this.scrollBehavior,
  this.debugPaintSizeEnabled,
  this.debugPaintBaselinesEnabled,
  this.debugPaintPointersEnabled,
  this.debugPaintLayerBordersEnabled,
  this.debugRepaintRainbowEnabled,
  FlutterExceptionHandler? errorHandler,
  ErrorWidgetBuilder? errorScreen,
  v.ReportErrorHandler? errorReport,
}) : super(
        controller: con,
        controllers: controllers,
        object: object,
      ) {
  // In case null was explicitly passed in.
  routes ??= const <String, WidgetBuilder>{};
  navigatorObservers ??= const <NavigatorObserver>[];
//    title ??= '';
//    color ??= Colors.blue;
  debugShowMaterialGrid ??= false;
  showPerformanceOverlay ??= false;
  checkerboardRasterCacheImages ??= false;
  checkerboardOffscreenLayers ??= false;
  showSemanticsDebugger ??= false;
  debugShowWidgetInspector ??= false;
  debugShowCheckedModeBanner ??= true;
  debugPaintSizeEnabled ??= false;
  debugPaintBaselinesEnabled ??= false;
  debugPaintPointersEnabled ??= false;
  debugPaintLayerBordersEnabled ??= false;
  debugRepaintRainbowEnabled ??= false;

  assert(() {
    /// Highlights UI while debugging.
    debug.debugPaintSizeEnabled = debugPaintSizeEnabled ?? false;
    debug.debugPaintBaselinesEnabled = debugPaintBaselinesEnabled ?? false;
    debug.debugPaintPointersEnabled = debugPaintPointersEnabled ?? false;
    debug.debugPaintLayerBordersEnabled =
        debugPaintLayerBordersEnabled ?? false;
    debug.debugRepaintRainbowEnabled = debugRepaintRainbowEnabled ?? false;
    debug.debugRepaintTextRainbowEnabled =
        debugRepaintRainbowEnabled ?? false;
    return true;
  }());

  if (errorHandler != null || errorScreen != null || errorReport != null) {
    // Supply a customized error handling.
    _errorHandler = v.AppErrorHandler(
        handler: errorHandler, builder: errorScreen, report: errorReport);
  }
}