@@ -63,6 +63,26 @@ class FormBuilderCupertinoTextField extends FormBuilderField<String> {
63
63
/// {@macro flutter.services.textInput.enableSuggestions}
64
64
final bool enableSuggestions;
65
65
66
+ /// A lighter colored placeholder hint that appears on the first line of the
67
+ /// text field when the text entry is empty.
68
+ ///
69
+ /// Defaults to having no placeholder text.
70
+ ///
71
+ /// The text style of the placeholder text matches that of the text field's
72
+ /// main text entry except a lighter font weight and a grey font color.
73
+ final String ? placeholder;
74
+
75
+ /// The style to use for the placeholder text.
76
+ ///
77
+ /// The [placeholderStyle] is merged with the [style] [TextStyle] when applied
78
+ /// to the [placeholder] text. To avoid merging with [style] , specify
79
+ /// [TextStyle.inherit] as false.
80
+ ///
81
+ /// Defaults to the [style] property with w300 font weight and grey color.
82
+ ///
83
+ /// If specifically set to null, placeholder's style will be the same as [style] .
84
+ final TextStyle ? placeholderStyle;
85
+
66
86
/// {@macro flutter.widgets.editableText.maxLines}
67
87
final int ? maxLines;
68
88
@@ -342,6 +362,8 @@ class FormBuilderCupertinoTextField extends FormBuilderField<String> {
342
362
this .scribbleEnabled = true ,
343
363
this .clearButtonMode = OverlayVisibilityMode .never,
344
364
this .contentInsertionConfiguration,
365
+ this .placeholder,
366
+ this .placeholderStyle
345
367
}) : assert (maxLines == null || maxLines > 0 ),
346
368
assert (minLines == null || minLines > 0 ),
347
369
assert (
@@ -386,6 +408,8 @@ class FormBuilderCupertinoTextField extends FormBuilderField<String> {
386
408
obscureText: obscureText,
387
409
autocorrect: autocorrect,
388
410
enableSuggestions: enableSuggestions,
411
+ placeholder: placeholder,
412
+ placeholderStyle: placeholderStyle,
389
413
maxLengthEnforcement: maxLengthEnforcement,
390
414
maxLines: maxLines,
391
415
minLines: minLines,
0 commit comments