formatPrice function

String formatPrice(
  1. int price,
  2. String locale
)

Implementation

String formatPrice(int price, String locale) {
  final NumberFormat formatter = NumberFormat('###,###', locale);
  return '\$${formatter.format(price)}';
}