asPrice method

String asPrice(
  1. String currencyCode, {
  2. String? locale,
})

Formats this number as a price.

9.99.asPrice('USD'); // '$9.99'

Implementation

String asPrice(String currencyCode, {String? locale}) {
  return PriceFormatter(locale: locale).format(this, currencyCode);
}