App.create constructor
App.create({
- required Widget widget,
- List<
AppProvider> ? appProviders, - List<
ErrorListener> ? errorListeners,
Creates the app.
Implementation
factory App.create({
required Widget widget,
List<AppProvider>? appProviders,
GlobalKey<NavigatorState>? navigatorKey,
List<ErrorListener>? errorListeners,
}) {
if (null != _instance) {
throw AlbaError('App is already created!');
}
_instance = App._(
widget: widget,
appProviders: appProviders,
navigatorKey: navigatorKey,
errorListeners: errorListeners ?? [DebugErrorListener()],
);
return _instance!;
}