diff --git a/lib/src/formatters/cert_nascimento_input_formatter.dart b/lib/src/formatters/cert_nascimento_input_formatter.dart index 31dcf77..e84fe2f 100644 --- a/lib/src/formatters/cert_nascimento_input_formatter.dart +++ b/lib/src/formatters/cert_nascimento_input_formatter.dart @@ -3,7 +3,8 @@ import 'package:flutter/services.dart'; /// Formata o valor do campo com a mascara de Certidão de Nascimento: `XXXXXX XX XX XXXX X XXXXX XXX XXXXXXX XX` class CertNascimentoInputFormatter extends TextInputFormatter { @override - TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) { + TextEditingValue formatEditUpdate( + TextEditingValue oldValue, TextEditingValue newValue) { // verifica o tamanho máximo do campo if (newValue.text.length > 32) return oldValue; diff --git a/pubspec.lock b/pubspec.lock index d1116e9..576f024 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -58,10 +58,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" flutter_test: dependency: "direct dev" description: flutter @@ -103,10 +103,10 @@ packages: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" matcher: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index b1f306c..7ca162b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: intl: ^0.19.0 dev_dependencies: - flutter_lints: ^3.0.0 + flutter_lints: ^4.0.0 flutter_test: sdk: flutter diff --git a/test/brasil_fields_test.dart b/test/brasil_fields_test.dart index d011500..cda4944 100644 --- a/test/brasil_fields_test.dart +++ b/test/brasil_fields_test.dart @@ -175,12 +175,14 @@ void main() { testWidgets('CertNascimentoFormatter', (WidgetTester tester) async { final textController = TextEditingController(); - await tester.pumpWidget(boilerplate(CertNascimentoInputFormatter(), textController)); + await tester.pumpWidget( + boilerplate(CertNascimentoInputFormatter(), textController)); - await tester.enterText(find.byType(TextField), '11111122334444566666777888888899'); + await tester.enterText( + find.byType(TextField), '11111122334444566666777888888899'); expect(textController.text, '111111 22 33 4444 5 66666 777 8888888 99'); }); - + testWidgets('HoraInputFormatter', (WidgetTester tester) async { final textController = TextEditingController(); await tester.pumpWidget(boilerplate(HoraInputFormatter(), textController));