formatters/formatter_utils
library
Functions
-
checkMask(String mask)
→ void
-
-
isCryptoCurrency(String currencyId)
→ bool
-
Basically it doesn't really check if the currencyId is
a crypto currency. It just checks if it's not fiat.
I decided not to collect all possible crypto currecies as
there's an endless amount of them
-
isDigit(String? character, {bool positiveOnly = false})
→ bool
-
character
a character to check if it's a digit against
positiveOnly
if true it will not allow a minus (dash) character
to be accepted as a part of a digit
-
isFiatCurrency(String currencyId)
→ bool
-
Checks if currency is fiat
-
isUnmaskableSymbol(String? symbol)
→ bool
-
-
numericStringStartsWithOrphanPeriod(String string)
→ bool
-
-
toCurrencyString(String value, {int mantissaLength = 2, ThousandSeparator thousandSeparator = ThousandSeparator.Comma, ShorteningPolicy shorteningPolicy = ShorteningPolicy.NoShortening, String leadingSymbol = '', String trailingSymbol = '', bool useSymbolPadding = false, bool isRawValue = false})
→ String
-
isRawValue
pass true if you
-
toNumericString(String? inputString, {bool allowPeriod = false, bool allowHyphen = true, String mantissaSeparator = '.', String? errorText, bool allowAllZeroes = false, int? mantissaLength})
→ String
-
errorText
if you don't want this method to throw any
errors, pass null here
allowAllZeroes
might be useful e.g. for phone masks
-
toNumericStringByRegex(String? inputString, {bool allowPeriod = false, bool allowHyphen = true})
→ String
-