Thanks to visit codestin.com
Credit goes to github.com

Skip to content

RangeError was thrown while dispatching notifications for MoneyMaskedTextController #57

@cassioseffrin

Description

@cassioseffrin

I am getting this exception when the MoneyMaskedTextController is set to blank ("")

flutter --version
Flutter 1.20.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision bbfbf1770c (11 days ago) • 2020-08-13 08:33:09 -0700
Engine • revision 9d5b21729f
Tools • Dart 2.9.1

flutter_masked_text: 0.8.0

Here is the initializer
_myMoneyField = MoneyMaskedTextController(
decimalSeparator: ',',
thousandSeparator: '.',
precision: 3,
initialValue: 1);

══╡ 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:

(elided 3 frames from dart:async)
The MoneyMaskedTextController sending notification was:
MoneyMaskedTextController#6f686(TextEditingValue(text: ┤├, selection: TextSelection(baseOffset:
-1, extentOffset: -1, affinity: TextAffinity.downstream, isDirectional: false), composing:
TextRange(start: -1, end: -1)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions