23 lines
567 B
Dart
23 lines
567 B
Dart
import 'package:didvan/models/enums.dart';
|
|
import 'package:didvan/utils/actions_sheet.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
class CoreProvier with ChangeNotifier {
|
|
AppState _appState = AppState.idle;
|
|
|
|
set appState(AppState newState) {
|
|
if (newState == AppState.isolatedBusy) {
|
|
ActionSheetUtils.showLogoLoadingIndicator();
|
|
}
|
|
if (_appState == AppState.isolatedBusy) {
|
|
ActionSheetUtils.pop();
|
|
}
|
|
_appState = newState;
|
|
notifyListeners();
|
|
}
|
|
|
|
void update() => notifyListeners();
|
|
|
|
AppState get appState => _appState;
|
|
}
|