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)
When the user selects the text and deletes it, flutter triggers the following error: