From 4140fd4608b07954a693b2a09cd806e94ef8ae5f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 15:36:55 +0000 Subject: [PATCH 1/8] build(deps): bump codecov/codecov-action from 4 to 5 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4...v5) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/base.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/base.yaml b/.github/workflows/base.yaml index 052d9f36b..580d423a5 100644 --- a/.github/workflows/base.yaml +++ b/.github/workflows/base.yaml @@ -59,7 +59,7 @@ jobs: - name: Run tests run: flutter test --coverage - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: From 6e9e1dc535ea575899d364b0e1fca955b5cbef50 Mon Sep 17 00:00:00 2001 From: fatyga Date: Sat, 30 Nov 2024 16:41:29 +0100 Subject: [PATCH 2/8] Add [side] parameter for FormBuilderFilterChip and FormBuilderChoiceChip Copy [side] parameter from Material's ChoiceChip widget with documentation. Copy [side] parameter form Material's FilterChip widget. --- example/pubspec.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 400ae348b..287d5de88 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" fake_async: dependency: transitive description: @@ -99,18 +99,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.8" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.9" leak_tracker_testing: dependency: transitive description: @@ -163,7 +163,7 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: @@ -176,10 +176,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.0" stream_channel: dependency: transitive description: @@ -192,10 +192,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" term_glyph: dependency: transitive description: @@ -208,10 +208,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.3" vector_math: dependency: transitive description: @@ -224,10 +224,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.3.0" sdks: dart: ">=3.5.0 <4.0.0" flutter: ">=3.24.0" From 736be3b9f06cbe16c2bfb170c19d008097a78921 Mon Sep 17 00:00:00 2001 From: fatyga Date: Sat, 7 Dec 2024 16:37:44 +0100 Subject: [PATCH 3/8] Add [side] parameter for ChoiceChip and FilterChip --- lib/src/fields/form_builder_choice_chips.dart | 24 +++++++++++++++ lib/src/fields/form_builder_filter_chips.dart | 3 ++ pubspec.lock | 30 +++++++++---------- 3 files changed, 42 insertions(+), 15 deletions(-) diff --git a/lib/src/fields/form_builder_choice_chips.dart b/lib/src/fields/form_builder_choice_chips.dart index 662922a58..2988d2581 100644 --- a/lib/src/fields/form_builder_choice_chips.dart +++ b/lib/src/fields/form_builder_choice_chips.dart @@ -51,6 +51,28 @@ class FormBuilderChoiceChip extends FormBuilderFieldDecoration { /// The default is [Colors.black]. final Color? shadowColor; + /// The color and weight of the chip's outline. + /// + /// Defaults to the border side in the ambient [ChipThemeData]. If the theme + /// border side resolves to null and [ThemeData.useMaterial3] is true, then + /// [BorderSide] with a [ColorScheme.outline] color is used when the chip is + /// enabled, and [BorderSide] with a [ColorScheme.onSurface] color with an + /// opacity of 0.12 is used when the chip is disabled. Otherwise, it defaults + /// to null. + /// + /// This value is combined with [shape] to create a shape decorated with an + /// outline. To omit the outline entirely, pass [BorderSide.none] to [side]. + /// + /// If it is a [WidgetStateBorderSide], [WidgetStateProperty.resolve] is + /// used for the following [WidgetState]s: + /// + /// * [WidgetState.disabled]. + /// * [WidgetState.selected]. + /// * [WidgetState.hovered]. + /// * [WidgetState.focused]. + /// * [WidgetState.pressed]. + final BorderSide? side; + /// The [OutlinedBorder] to draw around the chip. /// /// Defaults to the shape in the ambient [ChipThemeData]. If the theme @@ -293,6 +315,7 @@ class FormBuilderChoiceChip extends FormBuilderFieldDecoration { this.selectedColor, this.selectedShadowColor, this.shadowColor, + this.side, this.shape, this.spacing = 0.0, this.textDirection, @@ -317,6 +340,7 @@ class FormBuilderChoiceChip extends FormBuilderFieldDecoration { for (FormBuilderChipOption option in options) ChoiceChip( label: option, + side: side, shape: shape, selected: field.value == option.value, onSelected: state.enabled diff --git a/lib/src/fields/form_builder_filter_chips.dart b/lib/src/fields/form_builder_filter_chips.dart index d4d9e06d2..e30d8aa4b 100644 --- a/lib/src/fields/form_builder_filter_chips.dart +++ b/lib/src/fields/form_builder_filter_chips.dart @@ -13,6 +13,7 @@ class FormBuilderFilterChip extends FormBuilderFieldDecoration> { final double? elevation, pressElevation; final List> options; final MaterialTapTargetSize? materialTapTargetSize; + final BorderSide? side; final OutlinedBorder? shape; // Wrap Settings @@ -66,6 +67,7 @@ class FormBuilderFilterChip extends FormBuilderFieldDecoration> { this.selectedColor, this.selectedShadowColor, this.shadowColor, + this.side, this.shape, this.showCheckmark = true, this.spacing = 0.0, @@ -119,6 +121,7 @@ class FormBuilderFilterChip extends FormBuilderFieldDecoration> { pressElevation: pressElevation, materialTapTargetSize: materialTapTargetSize, padding: padding, + side: side, shape: shape, checkmarkColor: checkmarkColor, clipBehavior: clipBehavior, diff --git a/pubspec.lock b/pubspec.lock index 29c46a5c8..f6ac24361 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" fake_async: dependency: transitive description: @@ -79,18 +79,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.8" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.9" leak_tracker_testing: dependency: transitive description: @@ -143,7 +143,7 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: @@ -156,10 +156,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.0" stream_channel: dependency: transitive description: @@ -172,10 +172,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" term_glyph: dependency: transitive description: @@ -188,10 +188,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.3" vector_math: dependency: transitive description: @@ -204,10 +204,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.3.0" sdks: dart: ">=3.5.0 <4.0.0" flutter: ">=3.24.0" From 82f5aeb0fae4dc41bc7575a05c4881c83ad0bc9f Mon Sep 17 00:00:00 2001 From: Matias de Andrea Date: Wed, 18 Dec 2024 13:03:45 +0100 Subject: [PATCH 4/8] Update base.yaml --- .github/workflows/base.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/base.yaml b/.github/workflows/base.yaml index 580d423a5..6dfb982c1 100644 --- a/.github/workflows/base.yaml +++ b/.github/workflows/base.yaml @@ -60,8 +60,6 @@ jobs: run: flutter test --coverage - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: files: coverage/lcov.info name: flutter_form_builder From 81af3c33e0d91154b3afb661c42d33ef9268d5c2 Mon Sep 17 00:00:00 2001 From: Matias de Andrea Date: Wed, 18 Dec 2024 13:35:35 +0100 Subject: [PATCH 5/8] build: update dependencies --- example/pubspec.lock | 8 ++++---- pubspec.lock | 8 ++++---- pubspec.yaml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 287d5de88..7edec56c0 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -99,18 +99,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.8" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: diff --git a/pubspec.lock b/pubspec.lock index f6ac24361..6234f5774 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -79,18 +79,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.8" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 0c6f7e786..da4e372c2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ environment: dependencies: flutter: sdk: flutter - intl: ">=0.19.0 <0.20.0" + intl: ">=0.19.0 <0.21.0" dev_dependencies: flutter_lints: ^4.0.0 From 0082f2a8000cc3c1968d056a079fd70e01147fd2 Mon Sep 17 00:00:00 2001 From: Matias de Andrea Date: Wed, 18 Dec 2024 13:35:56 +0100 Subject: [PATCH 6/8] style: fix lint warnings --- lib/src/fields/form_builder_date_time_picker.dart | 3 --- lib/src/widgets/grouped_radio.dart | 1 - 2 files changed, 4 deletions(-) diff --git a/lib/src/fields/form_builder_date_time_picker.dart b/lib/src/fields/form_builder_date_time_picker.dart index 84c70f3f4..3ba64c737 100644 --- a/lib/src/fields/form_builder_date_time_picker.dart +++ b/lib/src/fields/form_builder_date_time_picker.dart @@ -284,7 +284,6 @@ class _FormBuilderDateTimePickerState extends FormBuilderFieldDecorationState< case InputType.date: return DateFormat.yMd(languageCode); case InputType.both: - default: return DateFormat.yMd(languageCode).add_Hms(); } } @@ -309,8 +308,6 @@ class _FormBuilderDateTimePickerState extends FormBuilderFieldDecorationState< newValue = combine(date, time); } break; - default: - throw 'Unexpected input type ${widget.inputType}'; } if (!mounted) return null; final finalValue = newValue ?? currentValue; diff --git a/lib/src/widgets/grouped_radio.dart b/lib/src/widgets/grouped_radio.dart index a26ac4571..855ff9cda 100644 --- a/lib/src/widgets/grouped_radio.dart +++ b/lib/src/widgets/grouped_radio.dart @@ -237,7 +237,6 @@ class _GroupedRadioState extends State> { child: Row(children: widgetList), ); case OptionsOrientation.wrap: - default: return SingleChildScrollView( child: Wrap( spacing: widget.wrapSpacing, From aa71b05b24e9e29d31e8c74c28bad4041cd2af49 Mon Sep 17 00:00:00 2001 From: Matias de Andrea Date: Wed, 18 Dec 2024 13:37:05 +0100 Subject: [PATCH 7/8] ci: update fvm action version --- .github/workflows/base.yaml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/.github/workflows/base.yaml b/.github/workflows/base.yaml index 052d9f36b..dc5a49260 100644 --- a/.github/workflows/base.yaml +++ b/.github/workflows/base.yaml @@ -35,21 +35,10 @@ jobs: with: distribution: 'zulu' java-version: '11' - - - name: Get Flutter version by FVM - uses: kuhnroyal/flutter-fvm-config-action@v2 - id: fvm-config-action - with: - path: ".fvmrc" - - - name: Flutter action - uses: subosito/flutter-action@v2 + - name: Setup Flutter + uses: kuhnroyal/flutter-fvm-config-action/setup@v3 with: - flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} - channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }} - architecture: x64 - cache: true - + path: '.fvmrc' - name: Install dependencies run: flutter pub get - name: Format code From a7d1b0bb3752a0e401ce1c32bb90e957dd14a72a Mon Sep 17 00:00:00 2001 From: Matias de Andrea Date: Wed, 18 Dec 2024 13:43:42 +0100 Subject: [PATCH 8/8] build: fix version --- pubspec.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index da4e372c2..43779563e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,9 @@ environment: dependencies: flutter: sdk: flutter - intl: ">=0.19.0 <0.21.0" + # This version would be max, the same version used on flutter_localizations + # https://github.com/flutter/flutter/blob/17025dd88227cd9532c33fa78f5250d548d87e9a/packages/flutter_localizations/pubspec.yaml#L14 + intl: ">=0.19.0 <0.20.0" dev_dependencies: flutter_lints: ^4.0.0