AppStatefulWidget constructor

AppStatefulWidget({
  1. Key? key,
  2. Widget? loadingScreen,
  3. bool? circularProgressIndicator = true,
  4. FlutterExceptionHandler? errorHandler,
  5. ErrorWidgetBuilder? errorScreen,
  6. ReportErrorHandler? errorReport,
  7. bool? allowNewHandlers = true,
})

The entrypoint of the framework passed to runApp() This is a StatelessWidget where you can define the loading screen or the App's error handling.

Implementation

AppStatefulWidget({
  Key? key,
  this.loadingScreen,
  this.circularProgressIndicator = true,
  // ignore: avoid_unused_constructor_parameters
  FlutterExceptionHandler? errorHandler,
  // ignore: avoid_unused_constructor_parameters
  ErrorWidgetBuilder? errorScreen,
  // ignore: avoid_unused_constructor_parameters
  v.ReportErrorHandler? errorReport,
  bool? allowNewHandlers = true,
})  : _app = v.App(allowNewHandlers: allowNewHandlers),
      super(key: key ?? GlobalKey<_StateApp>()) {
  // defer displaying anything while starting up
  if (circularProgressIndicator == null || !circularProgressIndicator!) {
    WidgetsFlutterBinding.ensureInitialized().deferFirstFrame();
  }
}