diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a098d83..4d25241 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: '3.3.7' + flutter-version: '3.7.0' channel: 'stable' - name: Install Dependencies diff --git a/CHANGELOG.md b/CHANGELOG.md index f9102f1..d46b903 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [10.0.0] - 01/29/2023 + +* upgrades to Flutter `3.7.0` +* minimum Dart SDK now is `2.19.0` +* removes `toolbarOptions` property from `FastTextField` +* adds `contextMenuBuilder` property to `FastTextField` + ## [9.0.1] - 01/24/2023 * upgrades `intl`to `0.18.0` diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 9f0d866..74956f6 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=2.19.0 <3.0.0" dependencies: flutter: diff --git a/lib/src/date_time/date_picker.dart b/lib/src/date_time/date_picker.dart index 616dcbf..05d3132 100644 --- a/lib/src/date_time/date_picker.dart +++ b/lib/src/date_time/date_picker.dart @@ -147,7 +147,7 @@ Text datePickerTextBuilder(FastDatePickerState field) { return Text( value != null ? format(field.value!) : '', - style: theme.textTheme.subtitle1, + style: theme.textTheme.titleMedium, textAlign: TextAlign.left, ); } diff --git a/lib/src/date_time/date_range_picker.dart b/lib/src/date_time/date_range_picker.dart index 018a61a..b17a9ed 100644 --- a/lib/src/date_time/date_range_picker.dart +++ b/lib/src/date_time/date_range_picker.dart @@ -99,7 +99,7 @@ Text dateRangPickerTextBuilder(FastDateRangePickerState field) { return Text( value != null ? '${format(value.start)} - ${format(value.end)}' : '', - style: theme.textTheme.subtitle1, + style: theme.textTheme.titleMedium, textAlign: TextAlign.left, ); } diff --git a/lib/src/date_time/time_picker.dart b/lib/src/date_time/time_picker.dart index 5098996..71c94ed 100644 --- a/lib/src/date_time/time_picker.dart +++ b/lib/src/date_time/time_picker.dart @@ -75,7 +75,7 @@ Text timePickerTextBuilder(FastTimePickerState field) { return Text( field.value?.format(field.context) ?? '', - style: theme.textTheme.subtitle1, + style: theme.textTheme.titleMedium, textAlign: TextAlign.left, ); } diff --git a/lib/src/form.dart b/lib/src/form.dart index 164e9cd..a8b22d2 100644 --- a/lib/src/form.dart +++ b/lib/src/form.dart @@ -230,7 +230,7 @@ InputDecoration _decorator(ThemeData theme, FastFormFieldState field) { labelText: widget.labelText, labelStyle: TextStyle( color: field.enabled - ? theme.textTheme.bodyText1!.color + ? theme.textTheme.bodyLarge!.color : theme.disabledColor, ), enabled: field.enabled, diff --git a/lib/src/text/text_field.dart b/lib/src/text/text_field.dart index 31e3919..25532a7 100644 --- a/lib/src/text/text_field.dart +++ b/lib/src/text/text_field.dart @@ -28,6 +28,7 @@ class FastTextField extends FastFormField { this.autofillHints, this.autofocus = false, this.buildCounter, + this.contextMenuBuilder, this.cursorColor, this.cursorHeight, this.cursorRadius, @@ -70,7 +71,6 @@ class FastTextField extends FastFormField { this.textCapitalization = TextCapitalization.none, this.textDirection, this.textInputAction, - this.toolbarOptions, this.trailing, }); @@ -78,6 +78,7 @@ class FastTextField extends FastFormField { final Iterable? autofillHints; final bool autofocus; final InputCounterWidgetBuilder? buildCounter; + final EditableTextContextMenuBuilder? contextMenuBuilder; final Color? cursorColor; final double? cursorHeight; final Radius? cursorRadius; @@ -120,7 +121,6 @@ class FastTextField extends FastFormField { final TextCapitalization textCapitalization; final TextDirection? textDirection; final TextInputAction? textInputAction; - final ToolbarOptions? toolbarOptions; final Widget? trailing; @override @@ -173,6 +173,7 @@ Widget materialTextFieldBuilder(FormFieldState field) { autofocus: widget.autofocus, autovalidateMode: field.autovalidateMode, buildCounter: widget.buildCounter, + contextMenuBuilder: widget.contextMenuBuilder, cursorColor: widget.cursorColor, cursorHeight: widget.cursorHeight, cursorRadius: widget.cursorRadius, @@ -214,7 +215,6 @@ Widget materialTextFieldBuilder(FormFieldState field) { textCapitalization: widget.textCapitalization, textDirection: widget.textDirection, textInputAction: widget.textInputAction, - toolbarOptions: widget.toolbarOptions, validator: widget.validator, ); } @@ -229,6 +229,7 @@ Widget cupertinoTextFieldBuilder(FormFieldState field) { autofillHints: widget.autofillHints, autofocus: widget.autofocus, autovalidateMode: field.autovalidateMode, + contextMenuBuilder: widget.contextMenuBuilder, cursorColor: widget.cursorColor, cursorHeight: widget.cursorHeight, cursorWidth: widget.cursorWidth, @@ -269,7 +270,6 @@ Widget cupertinoTextFieldBuilder(FormFieldState field) { textCapitalization: widget.textCapitalization, textDirection: widget.textDirection, textInputAction: widget.textInputAction, - toolbarOptions: widget.toolbarOptions, validator: widget.validator, ); } diff --git a/pubspec.yaml b/pubspec.yaml index 1be3824..b8c4554 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,10 +1,10 @@ name: flutter_fast_forms description: Flutter Fast Forms is the only Dart package you'll ever need to build Flutter forms fast. -version: 9.0.1 +version: 10.0.0 repository: https://github.com/udos86/flutter-fast-forms environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=2.19.0 <3.0.0" dependencies: flutter: @@ -23,7 +23,7 @@ dev_dependencies: # rules and activating additional ones. flutter_lints: ^2.0.1 - test: ^1.21.4 + test: ^1.22.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec