isValidAmount function

bool isValidAmount(
  1. double amount
)

Implementation

bool isValidAmount(double amount) {
  try {
    return amount.isFinite && amount >= 0;
  } catch (_) {
    return false;
  }
}