Skip to content

Commit

Permalink
reactive_extended_text_field 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilich6107 committed May 14, 2024
1 parent 62f7172 commit 7966724
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 8 deletions.
4 changes: 4 additions & 0 deletions packages/reactive_extended_text_field/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [3.0.0]

* extended_text_field: ^14.0.0

## [2.0.1]

* Support `reactive_forms: 17.x`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ import 'package:reactive_forms/reactive_forms.dart';

export 'package:extended_text_field/extended_text_field.dart';

Widget _defaultContextMenuBuilder(
BuildContext context, ExtendedEditableTextState editableTextState) {
return AdaptiveTextSelectionToolbar.buttonItems(
buttonItems: editableTextState.contextMenuButtonItems,
anchors: editableTextState.contextMenuAnchors,
);
// return AdaptiveTextSelectionToolbar.editableText(
// editableTextState: editableTextState,
// );
}

/// A [ReactiveExtendedTextField] that contains a [PhoneFormField].
///
/// This is a convenience widget that wraps a [PhoneFormField] widget in a
Expand Down Expand Up @@ -146,9 +157,18 @@ class ReactiveExtendedTextField<T> extends ReactiveFormField<T, String> {
TextCapitalization textCapitalization = TextCapitalization.none,
bool scribbleEnabled = true,
bool enableIMEPersonalizedLearning = true,
ShouldShowSelectionHandlesCallback? shouldShowSelectionHandles,
TextSelectionGestureDetectorBuilderCallback?
textSelectionGestureDetectorBuilder,
bool? cursorOpacityAnimates,
Color? cursorErrorColor,
UndoHistoryController? undoController,
MaterialStatesController? statesController,
bool onTapAlwaysCalled = false,
TapRegionCallback? onTapOutside,
InputCounterWidgetBuilder? buildCounter,
ContentInsertionConfiguration? contentInsertionConfiguration,
Clip clipBehavior = Clip.hardEdge,
ExtendedEditableTextContextMenuBuilder? extendedContextMenuBuilder = _defaultContextMenuBuilder,
bool canRequestFocus = true,
TextMagnifierConfiguration? magnifierConfiguration,
}) : super(
builder: (field) {
final state = field as _ReactivePhoneFormFieldState<T>;
Expand All @@ -160,6 +180,8 @@ class ReactiveExtendedTextField<T> extends ReactiveFormField<T, String> {
return ExtendedTextField(
focusNode: state.focusNode,
controller: state._textController,
undoController:undoController,
statesController:statesController,
onChanged: field.didChange,
autofillHints: autofillHints,
autofocus: autofocus,
Expand Down Expand Up @@ -218,9 +240,16 @@ class ReactiveExtendedTextField<T> extends ReactiveFormField<T, String> {
specialTextSpanBuilder: specialTextSpanBuilder,
scribbleEnabled: scribbleEnabled,
enableIMEPersonalizedLearning: enableIMEPersonalizedLearning,
shouldShowSelectionHandles: shouldShowSelectionHandles,
textSelectionGestureDetectorBuilder:
textSelectionGestureDetectorBuilder,
cursorOpacityAnimates:cursorOpacityAnimates,
cursorErrorColor:cursorErrorColor,
onTapAlwaysCalled:onTapAlwaysCalled,
onTapOutside:onTapOutside,
buildCounter:buildCounter,
clipBehavior:clipBehavior,
contentInsertionConfiguration:contentInsertionConfiguration,
extendedContextMenuBuilder:extendedContextMenuBuilder,
canRequestFocus:canRequestFocus,
magnifierConfiguration:magnifierConfiguration,
);
},
);
Expand Down
4 changes: 2 additions & 2 deletions packages/reactive_extended_text_field/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: reactive_extended_text_field
description: Wrapper around extended_text_field to use with reactive_forms.
version: 2.0.1
version: 3.0.0
repository: https://github.com/artflutter/reactive_forms_widgets/tree/master/packages/reactive_extended_text_field
issue_tracker: https://github.com/artflutter/reactive_forms_widgets/issues

Expand All @@ -12,7 +12,7 @@ dependencies:
flutter:
sdk: flutter
reactive_forms: ">=16.0.0 <18.0.0"
extended_text_field: ^10.2.0
extended_text_field: ^14.0.0

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 7966724

Please sign in to comment.