Skip to content

Commit acb7364

Browse files
Merge pull request #1399 from flutter-form-builder-ecosystem/fix-lints-flutter-3.22
feat: #1373 update lints flutter 3.22
2 parents 7ef91ff + 18d748a commit acb7364

24 files changed

+105
-104
lines changed

.fvmrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"flutter": "stable"
3+
}

.github/workflows/base.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111

1212
workflow_dispatch:
1313

14+
# This ensures that previous jobs for the PR are canceled when PR is updated
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
1419
jobs:
1520
build:
1621
runs-on: macos-latest
@@ -33,6 +38,7 @@ jobs:
3338
uses: subosito/flutter-action@v2
3439
with:
3540
channel: 'stable'
41+
cache: true
3642

3743
- name: Install dependencies
3844
run: flutter pub get
@@ -43,7 +49,9 @@ jobs:
4349
- name: Run tests
4450
run: flutter test --coverage
4551
- name: Upload coverage to Codecov
46-
uses: codecov/codecov-action@v3
52+
uses: codecov/codecov-action@v4
53+
env:
54+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4755
with:
4856
files: coverage/lcov.info
4957
name: flutter_form_builder
@@ -70,5 +78,6 @@ jobs:
7078
uses: subosito/flutter-action@v2
7179
with:
7280
channel: 'stable'
81+
cache: true
7382
- name: Publish package
7483
run: dart pub publish -v -f

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# The .vscode folder contains launch configuration and tasks you configure in
2020
# VS Code which you may wish to be included in version control, so this line
2121
# is commented out by default.
22-
#.vscode/
22+
.vscode/
2323

2424
# Flutter/Dart/Pub related
2525
**/doc/api/

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# [9.3.0]
2+
3+
* Set minimal Flutter version to 3.22.0
4+
* Set minimal Dart version to 3.4.0
5+
* Update readme
6+
* Add OverflowBar layout for radios and checkboxes
7+
* fix: #1396 fix dynamic fields example widget issues
8+
* Update to use 0.19.0 of intl package
9+
110
# [9.2.1]
211

312
* Set minimal Flutter version to 3.16.0

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Also included are common ready-made form input fields for FormBuilder. This give
1010
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/flutter-form-builder-ecosystem/flutter_form_builder?logo=codefactor&style=for-the-badge)](https://www.codefactor.io/repository/github/flutter-form-builder-ecosystem/flutter_form_builder)
1111
___
1212

13+
## Call for Maintainers
14+
15+
> We are looking for maintainers to contribute to the development and maintenance of Flutter Form Builder Ecosystem. Is very important to keep the project alive and growing, so we need your help to keep it up to date and with new features. You can contribute in many ways, we describe some of them in [Support](#support) section.
16+
1317
- [Features](#features)
1418
- [Inputs](#inputs)
1519
- [Parameters](#parameters)
@@ -281,7 +285,7 @@ FormBuilderTextField(
281285
Set the error text
282286

283287
```dart
284-
RaisedButton(
288+
ElevatedButton(
285289
child: Text('Submit'),
286290
onPressed: () async {
287291
setState(() => _emailError = null);

example/.metadata

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# This file tracks properties of this Flutter project.
22
# Used by Flutter tool to assess capabilities and perform upgrades etc.
33
#
4-
# This file should be version controlled.
4+
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
8-
channel: stable
7+
revision: "a14f74ff3a1cbd521163c5f03d68113d50af93d3"
8+
channel: "stable"
99

1010
project_type: app
1111

1212
# Tracks metadata for the flutter migrate command
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
17-
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
18-
- platform: android
19-
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
20-
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
16+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
17+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
18+
- platform: web
19+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
20+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
2121

2222
# User provided section
2323

example/lib/main.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import 'sources/signup_form.dart';
1515
void main() => runApp(const MyApp());
1616

1717
class MyApp extends StatelessWidget {
18-
const MyApp({Key? key}) : super(key: key);
18+
const MyApp({super.key});
1919

2020
@override
2121
Widget build(BuildContext context) {
@@ -37,7 +37,7 @@ class MyApp extends StatelessWidget {
3737
}
3838

3939
class _HomePage extends StatelessWidget {
40-
const _HomePage({Key? key}) : super(key: key);
40+
const _HomePage();
4141

4242
@override
4343
Widget build(BuildContext context) {

example/lib/sources/complete_form.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import 'package:form_builder_validators/form_builder_validators.dart';
44
import 'package:intl/intl.dart';
55

66
class CompleteForm extends StatefulWidget {
7-
const CompleteForm({Key? key}) : super(key: key);
7+
const CompleteForm({super.key});
88

99
@override
1010
State<CompleteForm> createState() {

example/lib/sources/conditional_fields.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'package:flutter_form_builder/flutter_form_builder.dart';
33
import 'package:form_builder_validators/form_builder_validators.dart';
44

55
class ConditionalFields extends StatefulWidget {
6-
const ConditionalFields({Key? key}) : super(key: key);
6+
const ConditionalFields({super.key});
77

88
@override
99
State<ConditionalFields> createState() => _ConditionalFieldsState();

example/lib/sources/custom_fields.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
22
import 'package:flutter_form_builder/flutter_form_builder.dart';
33

44
class CustomFields extends StatefulWidget {
5-
const CustomFields({Key? key}) : super(key: key);
5+
const CustomFields({super.key});
66

77
@override
88
State<CustomFields> createState() => _CustomFieldsState();

example/lib/sources/decorated_radio_checkbox.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'package:flutter_form_builder/flutter_form_builder.dart';
33

44
/// Demonstrates the use of itemDecorators to wrap a box around selection items
55
class DecoratedRadioCheckbox extends StatefulWidget {
6-
const DecoratedRadioCheckbox({Key? key}) : super(key: key);
6+
const DecoratedRadioCheckbox({super.key});
77

88
@override
99
State<DecoratedRadioCheckbox> createState() => _DecoratedRadioCheckboxState();

example/lib/sources/dynamic_fields.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'package:form_builder_validators/form_builder_validators.dart';
77
/// fields that can be added to this widget. For the purposes of the widget, it
88
/// is more than sufficient.
99
class DynamicFields extends StatefulWidget {
10-
const DynamicFields({Key? key}) : super(key: key);
10+
const DynamicFields({super.key});
1111

1212
@override
1313
State<DynamicFields> createState() => _DynamicFieldsState();

example/lib/sources/grouped_radio_checkbox.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'package:flutter_form_builder/flutter_form_builder.dart';
33
import 'package:form_builder_validators/form_builder_validators.dart';
44

55
class GroupedRadioCheckbox extends StatefulWidget {
6-
const GroupedRadioCheckbox({Key? key}) : super(key: key);
6+
const GroupedRadioCheckbox({super.key});
77

88
@override
99
State<GroupedRadioCheckbox> createState() {

example/lib/sources/related_fields.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
22
import 'package:flutter_form_builder/flutter_form_builder.dart';
33

44
class RelatedFields extends StatefulWidget {
5-
const RelatedFields({Key? key}) : super(key: key);
5+
const RelatedFields({super.key});
66

77
@override
88
State<RelatedFields> createState() => _RelatedFieldsState();

example/lib/sources/signup_form.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'package:flutter_form_builder/flutter_form_builder.dart';
33
import 'package:form_builder_validators/form_builder_validators.dart';
44

55
class SignupForm extends StatefulWidget {
6-
const SignupForm({Key? key}) : super(key: key);
6+
const SignupForm({super.key});
77

88
@override
99
State<SignupForm> createState() => _SignupFormState();

example/pubspec.lock

+9-10
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ packages:
6565
dependency: "direct dev"
6666
description:
6767
name: flutter_lints
68-
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
68+
sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
6969
url: "https://pub.dev"
7070
source: hosted
71-
version: "2.0.3"
71+
version: "4.0.0"
7272
flutter_localizations:
7373
dependency: "direct main"
7474
description: flutter
@@ -82,12 +82,11 @@ packages:
8282
form_builder_validators:
8383
dependency: "direct main"
8484
description:
85-
path: "."
86-
ref: HEAD
87-
resolved-ref: a4950b46152220c709d0860df1f32fbaa2e79846
88-
url: "https://github.com/flutter-form-builder-ecosystem/form_builder_validators.git"
89-
source: git
90-
version: "9.1.0"
85+
name: form_builder_validators
86+
sha256: "475853a177bfc832ec12551f752fd0001278358a6d42d2364681ff15f48f67cf"
87+
url: "https://pub.dev"
88+
source: hosted
89+
version: "10.0.1"
9190
intl:
9291
dependency: "direct main"
9392
description:
@@ -124,10 +123,10 @@ packages:
124123
dependency: transitive
125124
description:
126125
name: lints
127-
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
126+
sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
128127
url: "https://pub.dev"
129128
source: hosted
130-
version: "2.1.1"
129+
version: "4.0.0"
131130
matcher:
132131
dependency: transitive
133132
description:

example/pubspec.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
44
version: 1.0.0+1
55

66
environment:
7-
sdk: ">=3.0.0 <4.0.0"
8-
flutter: ">=3.10.0"
7+
sdk: ">=3.4.0 <4.0.0"
8+
flutter: ">=3.22.0"
99

1010
dependencies:
1111
flutter:
1212
sdk: flutter
1313
flutter_form_builder:
1414
path: ../
15-
form_builder_validators: ^10.0.0
15+
form_builder_validators: ^10.0.1
1616
flutter_localizations:
1717
sdk: flutter
1818
intl: ^0.19.0
1919

2020
dev_dependencies:
21-
flutter_lints: ^2.0.1
21+
flutter_lints: ^4.0.0
2222
flutter_test:
2323
sdk: flutter
2424

example/web/index.html

+1-21
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,8 @@
3131

3232
<title>example</title>
3333
<link rel="manifest" href="manifest.json">
34-
35-
<script>
36-
// The value below is injected by flutter build, do not touch.
37-
var serviceWorkerVersion = null;
38-
</script>
39-
<!-- This script adds the flutter initialization JS code -->
40-
<script src="flutter.js" defer></script>
4134
</head>
4235
<body>
43-
<script>
44-
window.addEventListener('load', function(ev) {
45-
// Download main.dart.js
46-
_flutter.loader.loadEntrypoint({
47-
serviceWorker: {
48-
serviceWorkerVersion: serviceWorkerVersion,
49-
}
50-
}).then(function(engineInitializer) {
51-
return engineInitializer.initializeEngine();
52-
}).then(function(appRunner) {
53-
return appRunner.runApp();
54-
});
55-
});
56-
</script>
36+
<script src="flutter_bootstrap.js" async></script>
5737
</body>
5838
</html>

lib/src/fields/form_builder_choice_chips.dart

+16-16
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ class FormBuilderChoiceChip<T> extends FormBuilderFieldDecoration<T> {
5757
/// shape resolves to null, the default is [StadiumBorder].
5858
///
5959
/// This shape is combined with [side] to create a shape decorated with an
60-
/// outline. If it is a [MaterialStateOutlinedBorder],
61-
/// [MaterialStateProperty.resolve] is used for the following
62-
/// [MaterialState]s:
63-
///
64-
/// * [MaterialState.disabled].
65-
/// * [MaterialState.selected].
66-
/// * [MaterialState.hovered].
67-
/// * [MaterialState.focused].
68-
/// * [MaterialState.pressed].
60+
/// outline. If it is a [WidgetStateOutlinedBorder],
61+
/// [WidgetStateProperty.resolve] is used for the following
62+
/// [WidgetState]s:
63+
///
64+
/// * [WidgetState.disabled].
65+
/// * [WidgetState.selected].
66+
/// * [WidgetState.hovered].
67+
/// * [WidgetState.focused].
68+
/// * [WidgetState.pressed].
6969
final OutlinedBorder? shape;
7070

7171
/// Configures the minimum size of the tap target.
@@ -90,14 +90,14 @@ class FormBuilderChoiceChip<T> extends FormBuilderFieldDecoration<T> {
9090
/// This only has an effect on widgets that respect the [DefaultTextStyle],
9191
/// such as [Text].
9292
///
93-
/// If [labelStyle.color] is a [MaterialStateProperty<Color>], [MaterialStateProperty.resolve]
94-
/// is used for the following [MaterialState]s:
93+
/// If [labelStyle.color] is a [MaterialStateProperty<Color>], [WidgetStateProperty.resolve]
94+
/// is used for the following [WidgetState]s:
9595
///
96-
/// * [MaterialState.disabled].
97-
/// * [MaterialState.selected].
98-
/// * [MaterialState.hovered].
99-
/// * [MaterialState.focused].
100-
/// * [MaterialState.pressed].
96+
/// * [WidgetState.disabled].
97+
/// * [WidgetState.selected].
98+
/// * [WidgetState.hovered].
99+
/// * [WidgetState.focused].
100+
/// * [WidgetState.pressed].
101101
final TextStyle? labelStyle;
102102

103103
/// The padding between the contents of the chip and the outside [shape].

0 commit comments

Comments
 (0)