formatCurrency static method

String formatCurrency(
  1. double amount,
  2. String currencyCode, {
  3. String? symbol,
})

Format currency amount with proper symbol and decimal places

Implementation

static String formatCurrency(double amount, String currencyCode, {String? symbol}) {
  final currencySymbol = symbol ?? _getCurrencySymbol(currencyCode);
  return '$currencySymbol${amount.toStringAsFixed(2)}';
}