Skip to content

Commit f2b71bc

Browse files
committed
fix(analyze): replaced deprecated field with new one
1 parent 173d706 commit f2b71bc

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

lib/src/fields/form_builder_text_field.dart

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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,

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ repository: https://github.com/flutter-form-builder-ecosystem/flutter_form_build
55
issue_tracker: https://github.com/flutter-form-builder-ecosystem/flutter_form_builder/issues
66

77
environment:
8-
sdk: ">=2.19.0 <3.0.0"
9-
flutter: ">=3.7.0"
8+
sdk: ">2.18.9 <3.0.0"
9+
flutter: ">3.6.9"
1010

1111
dependencies:
1212
flutter:

0 commit comments

Comments
 (0)