formatted method

String formatted({
  1. bool showCurrency = true,
})

Format money as string

Implementation

String formatted({bool showCurrency = true}) {
  final formatted = amount.toStringAsFixed(2);
  return showCurrency ? '$formatted $currency' : formatted;
}