formattedAmount property

String get formattedAmount

Returns a formatted string representation of the amount, or "Not specified" for static QR.

Implementation

String get formattedAmount {
  if (amount == null) return 'Not specified';
  return '${amount!.toInt().toString().replaceAllMapped(
        RegExp(r'(\d{1,3})(?=(\d{3})+(?!\d))'),
        (Match m) => '${m[1]},',
      )} VND';
}