formatCost method

String formatCost(
  1. double cost
)

Formats a dollar cost value (e.g. $0.00, $1.23).

Implementation

String formatCost(double cost) {
  return '\$${cost.toStringAsFixed(2)}';
}