Skip to content

Commit

Permalink
fix(0.8.0): fixing crash when null value passed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-hur Santos Ott committed Feb 25, 2019
1 parent 96abc3f commit 0693aae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
### Fixed

- Fixing `initialValue` in `MoneyMaskedTextController`.

- Fixing crash when call `updateText` in `MaskedTextController` with `null` value. (thanks to [Israel Ibarra](https://github.com/ElZombieIsra))

## [0.7.0] - 2018-nov-12

Expand Down
2 changes: 2 additions & 0 deletions android/local.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sdk.dir=/Users/ben/Library/Android/sdk
flutter.sdk=/Users/ben/Documents/dev/flutter
6 changes: 5 additions & 1 deletion lib/flutter_masked_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ class MaskedTextController extends TextEditingController {
void updateText(String text) {
if(text != null){
this.text = this._applyMask(this.mask, text);
this._lastUpdatedText = this.text;
}
else {
this.text = '';
}

this._lastUpdatedText = this.text;
}

void updateMask(String mask, {bool moveCursorToEnd = true}) {
Expand Down

0 comments on commit 0693aae

Please sign in to comment.