From 0f12717b7fbbd35fce16491d00870c2315acdea3 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Sat, 24 Jan 2026 18:11:35 +0200 Subject: [PATCH] [FIX] Field Groups hydration --- lib/src/form/src/helpers/form_group_helper.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/src/form/src/helpers/form_group_helper.dart b/lib/src/form/src/helpers/form_group_helper.dart index dfd1595..b934b8f 100644 --- a/lib/src/form/src/helpers/form_group_helper.dart +++ b/lib/src/form/src/helpers/form_group_helper.dart @@ -12,7 +12,15 @@ class AstromicGroupHandler { int get count => _ids.value.length; - ValueNotifier> get _ids => _ctrl.groupIds(_groupId, _parentUuid); + ValueNotifier> 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>([]); + } + } /// Registers a new instance within this group and optionally hydrates it with [initialData]. ///