NumberInputFormatter class

TextInputFormatter for numbers validation and formatting.

FIXME: Only support period decimal separator and english locale.

Inheritance

Constructors

NumberInputFormatter({int maxLength = NumberInputFormatter.safeIntegerMaxLength, int maxValue = NumberInputFormatter.safeInteger, bool transformInvalidNumber = true, bool allowDecimals = true})

Properties

allowDecimals → bool
Specifies whether to allow decimal values.
final
hashCode → int
The hash code for this object.
no setterinherited
maxLength → int
Specifies the maximum number of digits allowed.
final
maxValue → int
Represents the largest possible value.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transformInvalidNumber → bool
Specifies whether to allow transformation of invalid numbers.
final

Methods

formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) → TextEditingValue
Called when text is being typed or cut/copy/pasted in the EditableText.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

defaultLocale → const String
safeInteger → const int
safeIntegerMaxLength → const int