You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 28, 2024. It is now read-only.
Dimitar Zabaznoski edited this page Jun 16, 2021
·
4 revisions
App is the entry widget of the app. It's a stateful widget that builds MaterialApp.
Before the build method, the pre-app configuration is executed, also after the build method, the post-app configuration will be executed. For more information about pre and post app configurations please check the configuration docs.
App widget lifecycle
initState
Activates AppLifecycleObserver
Initializes AppRouterDelegate
Initializes LocalizationNotifier
didChangeDependencies
When the build method finishes:
Calls post app configuration
Adds ‘debugOverlay’ (except in production)
build
Sets preferred orientations
Return multi provider with the following providers:
ThemeChangeNotifier
LocalizationNotifier
AppRouterDelegate
Consumer2 will be the child of the MultiProvider and provides observers for:
LocalizationNotifier: localeObject which provides locale changes on the fly
ThemeChangeNotifier: themeObject which provides theme changes on the fly
MaterialApp is returned from Consumer2 with the following configuration: