You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
String calculateFiatAmountRaw({double price, double cryptoAmount}) {
|
|
if (price == null) {
|
|
return '0.00';
|
|
}
|
|
|
|
final result = price * cryptoAmount;
|
|
|
|
if (result == 0.0) {
|
|
return '0.00';
|
|
}
|
|
|
|
return result > 0.01 ? result.toStringAsFixed(2) : '< 0.01';
|
|
} |