notZero method Null safety

double notZero(
  1. [double alt = 0.00001]
)

Implementation

double notZero([double alt = 0.00001]) {
  if (this == 0) {
    return alt;
  } else {
    return this.toDouble();
  }
}