formatDouble static method
Implementation
static String formatDouble(double value) {
final rounded = double.parse(value.toStringAsFixed(1));
if (rounded == rounded.toInt()) {
return rounded.toInt().toString();
} else {
return rounded.toStringAsFixed(1);
}
}