AppStatefulWidget constructor

AppStatefulWidget({
  1. Key? key,
  2. Widget? loadingScreen,
  3. bool? circularProgressIndicator = true,
  4. @Deprecated("The 'error' parameter is deprecated.") 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,
  @Deprecated("The 'error' parameter is deprecated.")
  bool? allowNewHandlers = true,
})  : _app = v.AppObject(),
      super(key: key ?? GlobalKey<_StateApp>()) {
  // Right at the start! Initialise the binding.
  final widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
  // defer displaying anything while starting up
  if (circularProgressIndicator == null || !circularProgressIndicator!) {
    widgetsBinding.deferFirstFrame();
  }
}