Skip to content

Commit

Permalink
Merge branch 'release/16.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
joanpablo committed Oct 20, 2023
2 parents 12f2172 + 145962f commit 94c928d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 16.1.1

## Fixes

- Add default Context Menu to `ReactiveTextField`.

# 16.1.0

## Features
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ dependencies:
flutter:
sdk: flutter

reactive_forms: ^16.1.0
reactive_forms: ^16.1.1
```
Then run the command `flutter packages get` on the console.
Expand Down
10 changes: 9 additions & 1 deletion lib/src/widgets/reactive_text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ import 'package:reactive_forms/reactive_forms.dart';
class ReactiveTextField<T> extends ReactiveFormField<T, String> {
final TextEditingController? _textController;

static Widget _defaultContextMenuBuilder(
BuildContext context, EditableTextState editableTextState) {
return AdaptiveTextSelectionToolbar.editableText(
editableTextState: editableTextState,
);
}

/// Creates a [ReactiveTextField] that contains a [TextField].
///
/// Can optionally provide a [formControl] to bind this widget to a control.
Expand Down Expand Up @@ -101,7 +108,8 @@ class ReactiveTextField<T> extends ReactiveFormField<T, String> {
TextAlignVertical? textAlignVertical,
bool autofocus = false,
bool readOnly = false,
EditableTextContextMenuBuilder? contextMenuBuilder,
EditableTextContextMenuBuilder? contextMenuBuilder =
_defaultContextMenuBuilder,
bool? showCursor,
bool obscureText = false,
String obscuringCharacter = '•',
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: reactive_forms
description: This is a model-driven approach to handling form inputs and validations, heavily inspired in Angular Reactive Forms.
version: 16.1.0
version: 16.1.1
homepage: "https://github.com/joanpablo/reactive_forms"

environment:
Expand Down

0 comments on commit 94c928d

Please sign in to comment.