Skip to content

Commit

Permalink
v1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensdemelo committed Oct 2, 2022
1 parent 9a5663b commit 79def75
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.6.0
- Adiciona `TemperaturaInputFormatter`
- Por [ClodoaldoRibeiro](https://github.com/ClodoaldoRibeiro), via este [PR](https://github.com/flutterbootcamp/brasil_fields/pull/75).

## 1.5.0
- Adiciona `obterDateTime`

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ Este package facilita o desenvolvimento de projetos que utilizam campos com os p

#### Dependência

Insira a dependência do pacote, executando o comando: `$ flutter pub add brasil_fields`
Insira a dependência do pacote, executando o comando:

`flutter pub add brasil_fields`

A opção acima é a recomendada, pois cria dependência dentro no formato adequado, e em seguida executa o comando para baixar o pacote automaticamente.

Se preferir 'fazer na mão', adicione a linha a seguir no seu arquivo pubspec.yaml

```yaml
dependencies:
brasil_fields: 1.5.0
brasil_fields: 1.6.0
```
Em seguida, execute o comando `flutter pub get` manualmente para baixar o pacote.
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.5.0"
version: "1.6.0"
characters:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: brasil_fields
description: O jeito mais fácil de utilizar padrões e formatos brasileiros em seu projeto Dart.
version: 1.5.0
version: 1.6.0
homepage: https://github.com/rubensdemelo/brasil_fields

environment:
Expand Down
10 changes: 9 additions & 1 deletion test/brasil_fields_test.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:brasil_fields/brasil_fields.dart';

import 'package:brasil_fields/src/formatters/compound_formatters/compound_formatter.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
Expand Down Expand Up @@ -227,6 +226,15 @@ void main() {
expect(textController.text, '1,76');
});

testWidgets('TemperaturaInputFormatter', (WidgetTester tester) async {
final textController = TextEditingController();
await tester
.pumpWidget(boilerplate(TemperaturaInputFormatter(), textController));

await tester.enterText(find.byType(TextField), '176');
expect(textController.text, '17,6');
});

testWidgets('PesoInputFormatter', (WidgetTester tester) async {
final textController = TextEditingController();

Expand Down

0 comments on commit 79def75

Please sign in to comment.