initializeContext method
Initializes the entire AppContext with all async initializers.
Implementation
Future<void> initializeContext() async {
if (!shouInitialize()) {
return;
}
loadingState = LoadingState.LOADING;
try {
await initializeDeviceType();
} catch (err) {
loadingState = LoadingState.ERROR;
notifyListeners();
}
loadingState = LoadingState.SUCCESS;
notifyListeners();
}