tryLocalizeKwh function
Returns a localized version of the given double with the given fraction digits and 'kwh' suffix.
Returns null if the given kwh is null.
Implementation
String? tryLocalizeKwh(double? kwh, {int fractionDigits = 1}) {
if (kwh == null) return null;
return '${kwh.toStringAsFixed(fractionDigits)}kwh';
}