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.