Skip to content

Commit

Permalink
Merge pull request #1399 from flutter-form-builder-ecosystem/fix-lint…
Browse files Browse the repository at this point in the history
…s-flutter-3.22

feat: #1373 update lints flutter 3.22
  • Loading branch information
deandreamatias authored May 25, 2024
2 parents 7ef91ff + 18d748a commit acb7364
Show file tree
Hide file tree
Showing 24 changed files with 105 additions and 104 deletions.
3 changes: 3 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"flutter": "stable"
}
11 changes: 10 additions & 1 deletion .github/workflows/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:

workflow_dispatch:

# This ensures that previous jobs for the PR are canceled when PR is updated
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: macos-latest
Expand All @@ -33,6 +38,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true

- name: Install dependencies
run: flutter pub get
Expand All @@ -43,7 +49,9 @@ jobs:
- name: Run tests
run: flutter test --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage/lcov.info
name: flutter_form_builder
Expand All @@ -70,5 +78,6 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Publish package
run: dart pub publish -v -f
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
.vscode/

# Flutter/Dart/Pub related
**/doc/api/
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# [9.3.0]

* Set minimal Flutter version to 3.22.0
* Set minimal Dart version to 3.4.0
* Update readme
* Add OverflowBar layout for radios and checkboxes
* fix: #1396 fix dynamic fields example widget issues
* Update to use 0.19.0 of intl package

# [9.2.1]

* Set minimal Flutter version to 3.16.0
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Also included are common ready-made form input fields for FormBuilder. This give
[![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)
___

## Call for Maintainers

> 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.
- [Features](#features)
- [Inputs](#inputs)
- [Parameters](#parameters)
Expand Down Expand Up @@ -281,7 +285,7 @@ FormBuilderTextField(
Set the error text

```dart
RaisedButton(
ElevatedButton(
child: Text('Submit'),
onPressed: () async {
setState(() => _emailError = null);
Expand Down
16 changes: 8 additions & 8 deletions example/.metadata
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
# This file should be version controlled and should not be manually edited.

version:
revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
channel: stable
revision: "a14f74ff3a1cbd521163c5f03d68113d50af93d3"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
- platform: android
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
- platform: web
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3

# User provided section

Expand Down
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import 'sources/signup_form.dart';
void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});

@override
Widget build(BuildContext context) {
Expand All @@ -37,7 +37,7 @@ class MyApp extends StatelessWidget {
}

class _HomePage extends StatelessWidget {
const _HomePage({Key? key}) : super(key: key);
const _HomePage();

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/sources/complete_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:form_builder_validators/form_builder_validators.dart';
import 'package:intl/intl.dart';

class CompleteForm extends StatefulWidget {
const CompleteForm({Key? key}) : super(key: key);
const CompleteForm({super.key});

@override
State<CompleteForm> createState() {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/sources/conditional_fields.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:form_builder_validators/form_builder_validators.dart';

class ConditionalFields extends StatefulWidget {
const ConditionalFields({Key? key}) : super(key: key);
const ConditionalFields({super.key});

@override
State<ConditionalFields> createState() => _ConditionalFieldsState();
Expand Down
2 changes: 1 addition & 1 deletion example/lib/sources/custom_fields.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';

class CustomFields extends StatefulWidget {
const CustomFields({Key? key}) : super(key: key);
const CustomFields({super.key});

@override
State<CustomFields> createState() => _CustomFieldsState();
Expand Down
2 changes: 1 addition & 1 deletion example/lib/sources/decorated_radio_checkbox.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter_form_builder/flutter_form_builder.dart';

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

@override
State<DecoratedRadioCheckbox> createState() => _DecoratedRadioCheckboxState();
Expand Down
2 changes: 1 addition & 1 deletion example/lib/sources/dynamic_fields.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:form_builder_validators/form_builder_validators.dart';
/// fields that can be added to this widget. For the purposes of the widget, it
/// is more than sufficient.
class DynamicFields extends StatefulWidget {
const DynamicFields({Key? key}) : super(key: key);
const DynamicFields({super.key});

@override
State<DynamicFields> createState() => _DynamicFieldsState();
Expand Down
2 changes: 1 addition & 1 deletion example/lib/sources/grouped_radio_checkbox.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:form_builder_validators/form_builder_validators.dart';

class GroupedRadioCheckbox extends StatefulWidget {
const GroupedRadioCheckbox({Key? key}) : super(key: key);
const GroupedRadioCheckbox({super.key});

@override
State<GroupedRadioCheckbox> createState() {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/sources/related_fields.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';

class RelatedFields extends StatefulWidget {
const RelatedFields({Key? key}) : super(key: key);
const RelatedFields({super.key});

@override
State<RelatedFields> createState() => _RelatedFieldsState();
Expand Down
2 changes: 1 addition & 1 deletion example/lib/sources/signup_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:form_builder_validators/form_builder_validators.dart';

class SignupForm extends StatefulWidget {
const SignupForm({Key? key}) : super(key: key);
const SignupForm({super.key});

@override
State<SignupForm> createState() => _SignupFormState();
Expand Down
19 changes: 9 additions & 10 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ packages:
dependency: "direct dev"
description:
name: flutter_lints
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
url: "https://pub.dev"
source: hosted
version: "2.0.3"
version: "4.0.0"
flutter_localizations:
dependency: "direct main"
description: flutter
Expand All @@ -82,12 +82,11 @@ packages:
form_builder_validators:
dependency: "direct main"
description:
path: "."
ref: HEAD
resolved-ref: a4950b46152220c709d0860df1f32fbaa2e79846
url: "https://github.com/flutter-form-builder-ecosystem/form_builder_validators.git"
source: git
version: "9.1.0"
name: form_builder_validators
sha256: "475853a177bfc832ec12551f752fd0001278358a6d42d2364681ff15f48f67cf"
url: "https://pub.dev"
source: hosted
version: "10.0.1"
intl:
dependency: "direct main"
description:
Expand Down Expand Up @@ -124,10 +123,10 @@ packages:
dependency: transitive
description:
name: lints
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "4.0.0"
matcher:
dependency: transitive
description:
Expand Down
8 changes: 4 additions & 4 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.10.0"
sdk: ">=3.4.0 <4.0.0"
flutter: ">=3.22.0"

dependencies:
flutter:
sdk: flutter
flutter_form_builder:
path: ../
form_builder_validators: ^10.0.0
form_builder_validators: ^10.0.1
flutter_localizations:
sdk: flutter
intl: ^0.19.0

dev_dependencies:
flutter_lints: ^2.0.1
flutter_lints: ^4.0.0
flutter_test:
sdk: flutter

Expand Down
22 changes: 1 addition & 21 deletions example/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,8 @@

<title>example</title>
<link rel="manifest" href="manifest.json">

<script>
// The value below is injected by flutter build, do not touch.
var serviceWorkerVersion = null;
</script>
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>
</head>
<body>
<script>
window.addEventListener('load', function(ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
}
}).then(function(engineInitializer) {
return engineInitializer.initializeEngine();
}).then(function(appRunner) {
return appRunner.runApp();
});
});
</script>
<script src="flutter_bootstrap.js" async></script>
</body>
</html>
32 changes: 16 additions & 16 deletions lib/src/fields/form_builder_choice_chips.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ class FormBuilderChoiceChip<T> extends FormBuilderFieldDecoration<T> {
/// shape resolves to null, the default is [StadiumBorder].
///
/// This shape is combined with [side] to create a shape decorated with an
/// outline. If it is a [MaterialStateOutlinedBorder],
/// [MaterialStateProperty.resolve] is used for the following
/// [MaterialState]s:
///
/// * [MaterialState.disabled].
/// * [MaterialState.selected].
/// * [MaterialState.hovered].
/// * [MaterialState.focused].
/// * [MaterialState.pressed].
/// outline. If it is a [WidgetStateOutlinedBorder],
/// [WidgetStateProperty.resolve] is used for the following
/// [WidgetState]s:
///
/// * [WidgetState.disabled].
/// * [WidgetState.selected].
/// * [WidgetState.hovered].
/// * [WidgetState.focused].
/// * [WidgetState.pressed].
final OutlinedBorder? shape;

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

/// The padding between the contents of the chip and the outside [shape].
Expand Down
Loading

0 comments on commit acb7364

Please sign in to comment.