MoneyInputFormatter class Null safety

Inheritance
Annotations
  • @Deprecated('This formatter will be removed in future versions of the' + ' package. Please use CurrencyInputFormatter instead')

Constructors

MoneyInputFormatter({ThousandSeparator thousandSeparator = ThousandSeparator.Comma, int mantissaLength = 2, String leadingSymbol = '', String trailingSymbol = '', bool useSymbolPadding = false, ValueChanged<double>? onValueChange, int? maxTextLength})
thousandSeparator specifies what symbol will be used to separate each block of 3 digits, e.g. ThousandSeparator.Comma will format million as 1,000,000 ShorteningPolicy.NoShortening displays a value of 1234456789.34 as 1,234,456,789.34 but ShorteningPolicy.RoundToThousands displays the same value as 1,234,456K mantissaLength specifies how many digits will be added after a period sign leadingSymbol any symbol (except for the ones that contain digits) the will be added in front of the resulting string. E.g. $ or € some of the signs are available via constants like MoneySymbols.EURO_SIGN but you can basically add any string instead of it. The main rule is that the string must not contain digits, preiods, commas and dashes trailingSymbol is the same as leading but this symbol will be added at the end of your resulting string like 1,250€ instead of €1,250 useSymbolPadding adds a space between the number and trailing / leading symbols like 1,250€ -> 1,250 € or €1,250€ -> € 1,250 onValueChange a callback that will be called on a number change

Properties

hashCode int
The hash code for this object.
read-onlyinherited
leadingSymbol String
final
mantissaLength int
final
maxTextLength int?
final
onValueChange ValueChanged<double>?
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
thousandSeparator ThousandSeparator
final
trailingSymbol String
final
useSymbolPadding bool
final

Methods

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

Operators

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