| 1 | import 'calculate_fiat_amount.dart'; |
| 2 | |
| 3 | String formatAmount(String amount) { |
| 4 | if ((!amount.contains('.')) && (!amount.contains(','))) { |
| 5 | return formatWithCommas(amount + '.00'); |
| 6 | } else if ((amount.endsWith('.')) || (amount.endsWith(','))) { |
| 7 | return formatWithCommas(amount + '00'); |
| 8 | } |
| 9 | return formatWithCommas(amount); |
| 10 | } |