Skip to content

Commit

Permalink
style: bump lint version to 1.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamizes committed Sep 10, 2021
1 parent d01393f commit c11117a
Show file tree
Hide file tree
Showing 19 changed files with 58 additions and 37 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Dart Package Versioning](https://dart.dev/tools/pub

## [Unreleased]

### Changed

- minor changes to the package description.

## [0.3.8] - 2021-08-19

### Added
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.7.0"
version: "2.8.1"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -155,7 +155,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1"
version: "0.4.2"
typed_data:
dependency: transitive
description:
Expand All @@ -176,7 +176,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.3.3"
version: "0.3.8"
sdks:
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.17.0"
3 changes: 2 additions & 1 deletion lib/src/brazil/br_mobile_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ class BrMobileField extends StatelessWidget {
: !strip
? onFieldSubmitted
: (String mask) => onFieldSubmitted(
mask.replaceAll(RegExp(r'[-()\s]'), ''));
mask.replaceAll(RegExp(r'[-()\s]'), ''),
);
return BasicTextField(
validator: Pair.str(BrMobile(mal: malformed), validator ?? _dummy),
blank: blank,
Expand Down
3 changes: 2 additions & 1 deletion lib/src/brazil/br_phone_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ class BrPhoneField extends StatelessWidget {
: !strip
? onFieldSubmitted
: (String mask) => onFieldSubmitted(
mask.replaceAll(RegExp(r'[-()\s]'), ''));
mask.replaceAll(RegExp(r'[-()\s]'), ''),
);
return BasicTextField(
validator: Pair.str(BrPhone(mal: malformed), validator ?? _dummy),
blank: blank,
Expand Down
4 changes: 3 additions & 1 deletion lib/src/core/basic_text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,9 @@ class BasicTextField extends StatelessWidget {
Key? key,
}) : this(
validator: Pair.str2(
Len.range(min, max, less: less, great: great), validator ?? _ok),
Len.range(min, max, less: less, great: great),
validator ?? _ok,
),
trim: trim,
blank: blank,
controller: controller,
Expand Down
50 changes: 26 additions & 24 deletions lib/src/core/well_formed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,33 @@ class WellFormed extends StatelessWidget {
}) : _toForm = ((context) {
final fkey = formKey ?? GlobalKey<FormState>();
return SafeArea(
child: Column(children: [
Form(
key: fkey,
child: Column(children: fields),
),
ListTile(
leading: leading ?? const SizedBox(),
title: submit(() {
final formState = fkey.currentState;
if (formState != null) {
if (formState.validate()) {
formState.save();
child: Column(
children: [
Form(
key: fkey,
child: Column(children: fields),
),
ListTile(
leading: leading ?? const SizedBox(),
title: submit(() {
final formState = fkey.currentState;
if (formState != null) {
if (formState.validate()) {
formState.save();
}
}
}
}),
trailing: reset == null
? const SizedBox()
: reset(() {
final formState = fkey.currentState;
if (formState != null) {
formState.reset();
}
}),
),
]),
}),
trailing: reset == null
? const SizedBox()
: reset(() {
final formState = fkey.currentState;
if (formState != null) {
formState.reset();
}
}),
),
],
),
);
}),
super(key: key);
Expand Down
8 changes: 4 additions & 4 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.7.0"
version: "2.8.1"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -73,7 +73,7 @@ packages:
name: lint
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.3"
version: "1.7.2"
mask_text_input_formatter:
dependency: "direct main"
description:
Expand Down Expand Up @@ -148,7 +148,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1"
version: "0.4.2"
typed_data:
dependency: transitive
description:
Expand All @@ -164,5 +164,5 @@ packages:
source: hosted
version: "2.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.14.0-360.0.dev <3.0.0"
flutter: ">=1.17.0"
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: well_formed
description: A form field package designed to relieve developers of much of the form-related coding. It provides field masking, validation, smart trimming, and more.
description: A form fields package designed to relieve developers of much of the burden of form-related coding. It provides field masking, validation, smart trimming, and more.
version: 0.3.8
homepage: https://dartoos.dev
repository: https://github.com/dartoos-dev/well_formed
Expand All @@ -17,4 +17,4 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
lint: ^1.5.3
lint: ^1.7.2
3 changes: 2 additions & 1 deletion test/brazil/br_mobile_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import 'package:well_formed/src/core/well_formed.dart';

import '../get_val.dart';

// ignore_for_file: require_trailing_commas

Future<void> main() async {
group('BrMobileField', () {
const empty = ''; // zero-length text.
Expand Down Expand Up @@ -81,7 +83,6 @@ Future<void> main() async {
expect(count, 1);
});

///
testWidgets('masked', (WidgetTester tester) async {
const trimmed = '(11) 99765-4322';
const untrimmed = '\n $trimmed \t';
Expand Down
1 change: 1 addition & 0 deletions test/brazil/br_phone_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:well_formed/src/core/well_formed.dart';

import '../get_val.dart';

// ignore_for_file: require_trailing_commas
Future<void> main() async {
group('BrPhoneField', () {
const empty = ''; // zero-length text.
Expand Down
1 change: 1 addition & 0 deletions test/brazil/cep_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:well_formed/src/core/well_formed.dart';

import '../get_val.dart';

// ignore_for_file: require_trailing_commas
Future<void> main() async {
group('CepField', () {
const empty = ''; // zero-length text.
Expand Down
1 change: 1 addition & 0 deletions test/brazil/cnpj_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:well_formed/src/core/well_formed.dart';

import '../get_val.dart';

// ignore_for_file: require_trailing_commas
Future<void> main() async {
group('CnpjField', () {
const empty = ''; // zero-length text.
Expand Down
1 change: 1 addition & 0 deletions test/brazil/cpf_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:well_formed/src/core/well_formed.dart';

import '../get_val.dart';

// ignore_for_file: require_trailing_commas
Future<void> main() async {
group('CpfField', () {
const empty = ''; // zero-length text.
Expand Down
1 change: 1 addition & 0 deletions test/core/basic_text_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:well_formed/src/core/well_formed.dart';

import '../get_val.dart';

// ignore_for_file: require_trailing_commas
Future<void> main() async {
group('BasicTextField', () {
const empty = ''; // zero-length text.
Expand Down
1 change: 1 addition & 0 deletions test/net/email_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:well_formed/src/net/email_field.dart';

import '../get_val.dart';

// ignore_for_file: require_trailing_commas
Future<void> main() async {
group('EmailField', () {
const empty = ''; // zero-length text.
Expand Down
1 change: 1 addition & 0 deletions test/numeric/digit_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:well_formed/src/numeric/digit_field.dart';

import '../get_val.dart';

// ignore_for_file: require_trailing_commas
Future<void> main() async {
group('DigitField', () {
const empty = ''; // zero-length text.
Expand Down
1 change: 1 addition & 0 deletions test/numeric/hex_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:well_formed/src/numeric/hex_field.dart';

import '../get_val.dart';

// ignore_for_file: require_trailing_commas
Future<void> main() async {
group('HexField', () {
const empty = ''; // zero-length text.
Expand Down
1 change: 1 addition & 0 deletions test/numeric/int_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:well_formed/src/numeric/int_field.dart';

import '../get_val.dart';

// ignore_for_file: require_trailing_commas
Future<void> main() async {
group('IntField', () {
const empty = ''; // zero-length text.
Expand Down
1 change: 1 addition & 0 deletions test/numeric/num_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:well_formed/src/numeric/num_field.dart';

import '../get_val.dart';

// ignore_for_file: require_trailing_commas
Future<void> main() async {
group('NumField', () {
const empty = ''; // zero-length text.
Expand Down

0 comments on commit c11117a

Please sign in to comment.