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,
  FlutterExceptionHandler? errorHandler,
  ErrorWidgetBuilder? errorScreen,
  v.ReportErrorHandler? errorReport,
  bool allowNewHandlers = true,
})  : _app = v.App(
        errorHandler: errorHandler,
        errorScreen: errorScreen,
        errorReport: errorReport,
        allowNewHandlers: allowNewHandlers,
      ),
      super(key: key ?? GlobalKey<_StateApp>()) {
  // defer displaying anything while starting up
  if (circularProgressIndicator == null || !circularProgressIndicator!) {
    WidgetsFlutterBinding.ensureInitialized().deferFirstFrame();
  }
}