double? getDoubleFromString(String? string) { if (string != null) return double.tryParse(string); return null; }