write method
Implementation
double write(num? value) {
value ??= 0;
if (this == auto) {
if (value <= 0) return 0;
final i = (value == 0) ? 0 : (log(value) / log(1000)).floor();
final u = this[i];
return (value * u.unit).toDouble();
} else {
return (value * unit).toDouble();
}
}