From c0e6083245ba71008c0b36ab8de47d6101a9fd4b Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Sat, 24 Jan 2026 08:17:39 +0200 Subject: [PATCH] [FIX] Error Stream in constructor. --- lib/src/form/src/widgets/custom_form_field.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/form/src/widgets/custom_form_field.dart b/lib/src/form/src/widgets/custom_form_field.dart index c2d7cee..c40acd8 100644 --- a/lib/src/form/src/widgets/custom_form_field.dart +++ b/lib/src/form/src/widgets/custom_form_field.dart @@ -74,7 +74,9 @@ class _AstromicCustomFieldState extends State> { _labelNode = widget.formController.node('${widget.formID}_label', initialValue: initialLabel); _dataNode.addListener(_syncDataToLabel); - widget.formController.errorStream.listen(_handleApiErrors); + if (widget.formController.errorStream != null) { + widget.formController.errorStream!.listen(_handleApiErrors); + } } /// Synchronizes the string display node whenever the raw data value changes.