static double strToFloat(String str, [double defaultValue = defaultDouble]) { if (str.isEmpty) return 0; try { return double.parse(str); } catch (e) { return defaultValue; } }