Files
Casha/lib/shared/utils/currency_utils.dart
T
2026-03-20 19:35:45 +03:00

10 lines
343 B
Dart

import '../../core/constants.dart';
String formatAmount(String symbol, double amount, AmountFormat fmt) {
// Symbols that need a space after them (prefix symbols like Br, ₽ etc.)
const spaceAfter = {'Br'};
final formatted = fmt.format(amount);
final sep = spaceAfter.contains(symbol) ? ' ' : '';
return '$symbol$sep$formatted';
}