Documentation Index
Fetch the complete documentation index at: https://starrycodes.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
π° Currency Formatting
The number of digits to display after the decimal point.
The symbol to use (e.g., βKESβ, β$β). Set to null to display no symbol.
currencyDirection
CurrencyDirection
default:"CurrencyDirection.left"
Placement of the currency symbol (left or right).
The character used to separate thousands.
The character used to separate the whole number from the decimals.
Converts the number to a given currency format, correctly handling thousand separators, decimal places, and symbol placement.final euroAmount = 9876.5;
print(euroAmount.toCurrency(
currencySymbol: 'β¬',
thousandsSeparator: '.',
decimalSeparator: ',',
currencyDirection: CurrencyDirection.right,
));
// 9.876,50 β¬
π Abbreviation
The number of decimal places to include.
If true, uses lowercase suffixes (b, m, k).
An optional symbol to prefix/suffix the result.
currencyDirection
CurrencyDirection
default:"CurrencyDirection.left"
Placement of the currency symbol (left or right).
Abbreviates the number to a concise format (e.g., 1.1B, 2.0K). Used for displaying large counts cleanly in UIs.print(1000000000.toAbbreviated(currencySymbol: 'USD')); // USD 1.0B