summaryrefslogtreecommitdiff
path: root/lib/view_model/badge_motive_view_model.dart
diff options
context:
space:
mode:
authoruvok2025-08-01 18:35:31 +0200
committeruvok2025-08-01 18:35:31 +0200
commitaa7a3935e053e3ab7294ce60b767632943fc682b (patch)
treefa0c5cce9448132911d1ad907812c48796ea823a /lib/view_model/badge_motive_view_model.dart
parente4fb32cd7489f7ad6077dab4f1d31d3756830e72 (diff)
Hilight current selection
Diffstat (limited to 'lib/view_model/badge_motive_view_model.dart')
-rw-r--r--lib/view_model/badge_motive_view_model.dart11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/view_model/badge_motive_view_model.dart b/lib/view_model/badge_motive_view_model.dart
index c00a36c..87060f8 100644
--- a/lib/view_model/badge_motive_view_model.dart
+++ b/lib/view_model/badge_motive_view_model.dart
@@ -54,4 +54,15 @@ class BadgeMotiveViewModel extends ChangeNotifier {
currentMotive = motive;
notifyListeners();
}
+
+ Future<void> getCurrentMotive() async {
+ if (_busy) return;
+ _busy = true;
+ notifyListeners();
+
+ currentMotive = await _motivSelect.getCurrentMotive();
+
+ _busy = false;
+ notifyListeners();
+ }
}