formatRange method

String formatRange(
  1. double minPrice,
  2. double maxPrice,
  3. String currencyCode
)

Formats a price range.

formatRange(9.99, 99.99, 'USD'); // '$9.99 - $99.99'

Implementation

String formatRange(
  double minPrice,
  double maxPrice,
  String currencyCode,
) {
  return '${format(minPrice, currencyCode)} - ${format(maxPrice, currencyCode)}';
}