Skip to content

Commit

Permalink
4.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Macacoazul01 committed Feb 22, 2024
1 parent 5158848 commit caa9447
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## [4.4.0] - 2024-02-19
## [4.4.1] - 2024-02-21
- Fixed `doubleTextWithoutCurrencySymbol`.

## [4.4.0] - 2024-02-21
- Added `doubleTextWithoutCurrencySymbol` getter to the controller. Now it is possible to return the number part of the controller as a String, formatted as a double (with `.` as decimal separator).
- Added a check to ensure that `thousandSymbol` and `decimalSymbol` ​​are not the same.

Expand Down
2 changes: 1 addition & 1 deletion lib/currency_textfield.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class CurrencyTextFieldController extends TextEditingController {

///return the number part of the controller as a String, formatted as a double (with `.` as decimal separator).
String get doubleTextWithoutCurrencySymbol =>
text.replaceFirst(_symbolSeparator, '').replaceFirst(decimalSymbol, '.');
text.replaceFirst(_symbolSeparator, '').replaceAll(thousandSymbol, '').replaceFirst(decimalSymbol, '.');

CurrencyTextFieldController({
String currencySymbol = 'R\$',
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: currency_textfield
description: A flutter package that implements a Controller for currency text input.
version: 4.4.0
version: 4.4.1
homepage: https://github.com/IsaiasSantana/currency_textfield
environment:
sdk: '>=3.0.0 <4.0.0'
Expand Down

0 comments on commit caa9447

Please sign in to comment.