@@ -73,12 +73,14 @@ class FormBuilderTextField extends FormBuilderField<String> {
7373 /// {@macro flutter.widgets.editableText.expands}
7474 final bool expands;
7575
76- /// Configuration of toolbar options.
76+ /// {@macro flutter.widgets.EditableText.contextMenuBuilder}
7777 ///
78- /// If not set, select all and paste will default to be enabled. Copy and cut
79- /// will be disabled if [obscureText] is true. If [readOnly] is true,
80- /// paste and cut will be disabled regardless.
81- final ToolbarOptions ? toolbarOptions;
78+ /// If not provided, will build a default menu based on the platform.
79+ ///
80+ /// See also:
81+ ///
82+ /// * [AdaptiveTextSelectionToolbar] , which is built by default.
83+ final EditableTextContextMenuBuilder ? contextMenuBuilder;
8284
8385 /// {@macro flutter.widgets.editableText.showCursor}
8486 final bool ? showCursor;
@@ -284,6 +286,13 @@ class FormBuilderTextField extends FormBuilderField<String> {
284286 /// {@macro flutter.services.autofill.autofillHints}
285287 final Iterable <String >? autofillHints;
286288
289+ ///{@macro flutter.widgets.text_selection.TextMagnifierConfiguration.intro}
290+ ///
291+ ///{@macro flutter.widgets.magnifier.intro}
292+ ///
293+ ///{@macro flutter.widgets.text_selection.TextMagnifierConfiguration.details}
294+ final TextMagnifierConfiguration ? magnifierConfiguration;
295+
287296 /// Creates a Material Design text field input.
288297 FormBuilderTextField ({
289298 super .key,
@@ -336,11 +345,12 @@ class FormBuilderTextField extends FormBuilderField<String> {
336345 this .selectionWidthStyle = ui.BoxWidthStyle .tight,
337346 this .smartDashesType,
338347 this .smartQuotesType,
339- this .toolbarOptions,
340348 this .selectionHeightStyle = ui.BoxHeightStyle .tight,
341349 this .autofillHints,
342350 this .obscuringCharacter = '•' ,
343351 this .mouseCursor,
352+ this .contextMenuBuilder,
353+ this .magnifierConfiguration,
344354 }) : assert (initialValue == null || controller == null ),
345355 assert (minLines == null || minLines > 0 ),
346356 assert (maxLines == null || maxLines > 0 ),
@@ -405,10 +415,11 @@ class FormBuilderTextField extends FormBuilderField<String> {
405415 selectionWidthStyle: selectionWidthStyle,
406416 smartDashesType: smartDashesType,
407417 smartQuotesType: smartQuotesType,
408- toolbarOptions: toolbarOptions,
409418 mouseCursor: mouseCursor,
419+ contextMenuBuilder: contextMenuBuilder,
410420 obscuringCharacter: obscuringCharacter,
411421 autofillHints: autofillHints,
422+ magnifierConfiguration: magnifierConfiguration,
412423 );
413424 },
414425 );
0 commit comments