[FIX] Field Groups hydration

This commit is contained in:
2026-01-24 18:11:35 +02:00
parent 5f8672f7e5
commit 0f12717b7f

View File

@@ -12,7 +12,15 @@ class AstromicGroupHandler {
int get count => _ids.value.length; int get count => _ids.value.length;
ValueNotifier<List<String>> get _ids => _ctrl.groupIds(_groupId, _parentUuid); ValueNotifier<List<String>> get _ids {
try {
return _ctrl.groupIds(_groupId, _parentUuid);
} catch (e) {
// Fallback to an empty notifier to prevent the UI from crashing
// while the controller catches up
return ValueNotifier<List<String>>([]);
}
}
/// Registers a new instance within this group and optionally hydrates it with [initialData]. /// Registers a new instance within this group and optionally hydrates it with [initialData].
/// ///