@@ -73,12 +73,14 @@ class FormBuilderTextField extends FormBuilderField<String> {
73
73
/// {@macro flutter.widgets.editableText.expands}
74
74
final bool expands;
75
75
76
- /// Configuration of toolbar options.
76
+ /// {@macro flutter.widgets.EditableText.contextMenuBuilder}
77
77
///
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;
82
84
83
85
/// {@macro flutter.widgets.editableText.showCursor}
84
86
final bool ? showCursor;
@@ -284,6 +286,13 @@ class FormBuilderTextField extends FormBuilderField<String> {
284
286
/// {@macro flutter.services.autofill.autofillHints}
285
287
final Iterable <String >? autofillHints;
286
288
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
+
287
296
/// Creates a Material Design text field input.
288
297
FormBuilderTextField ({
289
298
super .key,
@@ -336,11 +345,12 @@ class FormBuilderTextField extends FormBuilderField<String> {
336
345
this .selectionWidthStyle = ui.BoxWidthStyle .tight,
337
346
this .smartDashesType,
338
347
this .smartQuotesType,
339
- this .toolbarOptions,
340
348
this .selectionHeightStyle = ui.BoxHeightStyle .tight,
341
349
this .autofillHints,
342
350
this .obscuringCharacter = '•' ,
343
351
this .mouseCursor,
352
+ this .contextMenuBuilder,
353
+ this .magnifierConfiguration,
344
354
}) : assert (initialValue == null || controller == null ),
345
355
assert (minLines == null || minLines > 0 ),
346
356
assert (maxLines == null || maxLines > 0 ),
@@ -405,10 +415,11 @@ class FormBuilderTextField extends FormBuilderField<String> {
405
415
selectionWidthStyle: selectionWidthStyle,
406
416
smartDashesType: smartDashesType,
407
417
smartQuotesType: smartQuotesType,
408
- toolbarOptions: toolbarOptions,
409
418
mouseCursor: mouseCursor,
419
+ contextMenuBuilder: contextMenuBuilder,
410
420
obscuringCharacter: obscuringCharacter,
411
421
autofillHints: autofillHints,
422
+ magnifierConfiguration: magnifierConfiguration,
412
423
);
413
424
},
414
425
);
0 commit comments