This commit is contained in:
2026-03-20 16:28:26 +03:00
parent 0625e79e73
commit 250bd94812
5 changed files with 117 additions and 38 deletions
+9
View File
@@ -0,0 +1,9 @@
String formatAmount(String symbol, double amount) {
// Symbols that need a space after them (prefix symbols like Br, ₽ etc.)
const spaceAfter = {'Br', ''};
final formatted = amount.toStringAsFixed(2);
if (spaceAfter.contains(symbol)) {
return '$symbol $formatted';
}
return '$symbol$formatted';
}