mirror of
https://github.com/koloideal/Casha.git
synced 2026-06-10 10:25:28 +03:00
stableee
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
import '../../core/constants.dart';
|
||||
|
||||
String formatAmount(String symbol, double amount, AmountFormat fmt) {
|
||||
const spaceAfter = {'Br'};
|
||||
final formatted = fmt.format(amount);
|
||||
// For BYN, symbol is empty string, so we use 'Br' for text-only contexts like CSV
|
||||
final displaySymbol = symbol.isEmpty ? 'Br' : symbol;
|
||||
final sep = spaceAfter.contains(displaySymbol) ? ' ' : '';
|
||||
return '$displaySymbol$sep$formatted';
|
||||
if (symbol.isEmpty) return formatted;
|
||||
return '$symbol$formatted';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user