@@ -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;
@@ -343,11 +345,11 @@ class FormBuilderTextField extends FormBuilderField<String> {
343345 this .selectionWidthStyle = ui.BoxWidthStyle .tight,
344346 this .smartDashesType,
345347 this .smartQuotesType,
346- this .toolbarOptions,
347348 this .selectionHeightStyle = ui.BoxHeightStyle .tight,
348349 this .autofillHints,
349350 this .obscuringCharacter = '•' ,
350351 this .mouseCursor,
352+ this .contextMenuBuilder,
351353 this .magnifierConfiguration,
352354 }) : assert (initialValue == null || controller == null ),
353355 assert (minLines == null || minLines > 0 ),
@@ -413,8 +415,8 @@ class FormBuilderTextField extends FormBuilderField<String> {
413415 selectionWidthStyle: selectionWidthStyle,
414416 smartDashesType: smartDashesType,
415417 smartQuotesType: smartQuotesType,
416- toolbarOptions: toolbarOptions,
417418 mouseCursor: mouseCursor,
419+ contextMenuBuilder: contextMenuBuilder,
418420 obscuringCharacter: obscuringCharacter,
419421 autofillHints: autofillHints,
420422 magnifierConfiguration: magnifierConfiguration,
0 commit comments