Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty field triggers errors on MoneyMaskedTextController #69

Open
thiagocordeiro opened this issue Mar 28, 2021 · 0 comments
Open

Empty field triggers errors on MoneyMaskedTextController #69

thiagocordeiro opened this issue Mar 28, 2021 · 0 comments

Comments

@thiagocordeiro
Copy link

When the user selects the text and deletes it, flutter triggers the following error:

======== Exception caught by foundation library ====================================================
The following RangeError was thrown while dispatching notifications for MoneyMaskedTextController:
Invalid value: Only valid value is 0: -2

When the exception was thrown, this was the stack: 
#0      List.insert (dart:core-patch/growable_array.dart:11:7)
#1      MoneyMaskedTextController.numberValue (package:flutter_masked_text/flutter_masked_text.dart:189:11)
#2      new MoneyMaskedTextController.<anonymous closure> (package:flutter_masked_text/flutter_masked_text.dart:140:29)
#3      ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:243:25)
#4      ValueNotifier.value= (package:flutter/src/foundation/change_notifier.dart:309:5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant