diff options
author | uvok | 2025-08-01 18:21:17 +0200 |
---|---|---|
committer | uvok | 2025-08-01 18:21:17 +0200 |
commit | e4fb32cd7489f7ad6077dab4f1d31d3756830e72 (patch) | |
tree | bd68c80ee8dee30ae4cd4a5102b2f37838341e39 /lib/view_model/badge_motive_view_model.dart | |
parent | 28e4d74ef0a6e46d37c9cc5d98ca62334e69523c (diff) |
Use VM to get current selection
Diffstat (limited to 'lib/view_model/badge_motive_view_model.dart')
-rw-r--r-- | lib/view_model/badge_motive_view_model.dart | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/view_model/badge_motive_view_model.dart b/lib/view_model/badge_motive_view_model.dart index 75bd5b0..c00a36c 100644 --- a/lib/view_model/badge_motive_view_model.dart +++ b/lib/view_model/badge_motive_view_model.dart @@ -30,6 +30,7 @@ class BadgeMotiveViewModel extends ChangeNotifier { bool get allowSelection => !_busy; List<BadgeMotive> get motives => _motives; + BadgeMotive? currentMotive; Future<void> updateMotives() async { if (_busy) return; @@ -50,6 +51,7 @@ class BadgeMotiveViewModel extends ChangeNotifier { await _motivSelect.setCurrentMotive(motive); logger.t("<Set motive to ${motive.id}"); _busy = false; + currentMotive = motive; notifyListeners(); } } |