@@ -272,15 +272,6 @@ class FormBuilderCupertinoTextField extends FormBuilderField<String> {
272272 /// null, the row is shorter.
273273 final Widget ? helper;
274274
275- /// A builder widget that is displayed underneath the [prefix] and [child] widgets.
276- ///
277- /// The [error] widget is primarily used to inform users of input errors. When
278- /// a [Text] is given to [error] , it will be shown in
279- /// [CupertinoColors.destructiveRed] coloring and medium-weighted font. The
280- /// row becomes taller in order to display the [helper] widget underneath
281- /// [prefix] and [child] . If null, the row is shorter.
282- final Widget ? Function (String error)? errorBuilder;
283-
284275 /// {@macro flutter.widgets.editableText.scribbleEnabled}
285276 final bool scribbleEnabled;
286277
@@ -339,6 +330,7 @@ class FormBuilderCupertinoTextField extends FormBuilderField<String> {
339330 super .onReset,
340331 super .focusNode,
341332 super .restorationId,
333+ super .errorBuilder,
342334 this .readOnly = false ,
343335 this .maxLines = 1 ,
344336 this .obscureText = false ,
@@ -384,7 +376,6 @@ class FormBuilderCupertinoTextField extends FormBuilderField<String> {
384376 this .magnifierConfiguration,
385377 this .decoration,
386378 this .shouldExpandedField = false ,
387- this .errorBuilder,
388379 this .helper,
389380 this .contentPadding,
390381 this .prefix,
@@ -499,7 +490,7 @@ class FormBuilderCupertinoTextField extends FormBuilderField<String> {
499490 error:
500491 state.hasError
501492 ? errorBuilder != null
502- ? errorBuilder (state.errorText ?? '' )
493+ ? errorBuilder (state.context, state. errorText ?? '' )
503494 : Text (state.errorText ?? '' )
504495 : null ,
505496 helper: helper,
0 commit comments