feat: better and centralized loading screen
This commit is contained in:
parent
eb83e9fbe3
commit
b751d93be6
11 changed files with 82 additions and 13 deletions
|
|
@ -71,10 +71,16 @@ class SellViewModel extends ChangeNotifier {
|
|||
bool isLoaded = false;
|
||||
|
||||
Future<Result<void>> _load() async {
|
||||
final result2 = await _loadBal();
|
||||
isLoaded = true;
|
||||
final result1 = await _loadBal();
|
||||
switch (result1) {
|
||||
case Ok():
|
||||
isLoaded = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
notifyListeners();
|
||||
return result2;
|
||||
return result1;
|
||||
}
|
||||
|
||||
Future<Result<void>> _loadBal() async {
|
||||
|
|
|
|||
Reference in a new issue