isZero function

bool isZero(
  1. String str
)

Returns true if the numeric value of str is exactly zero.

Implementation

bool isZero(String str) {
  final val = double.tryParse(str);
  return val != null && val == 0;
}