formatted property

String get formatted

Formatted price string (e.g., "$9.99")

Implementation

String get formatted {
  final amount = amountMicros / 1000000.0;
  // Simple currency symbol lookup for common codes
  final symbol = switch (currencyCode) {
    'USD' => '\$',
    'EUR' => '€',
    'GBP' => '£',
    _ => '$currencyCode ',
  };
  return '$symbol${amount.toStringAsFixed(2)}';
}