List? parseListString(Iterable? json){ if(json==null) return null; return List.from(json); } T? cast(x) => x is T ? x : null; bool isNumeric(String? s) { if (s == null) { return false; } return double.tryParse(s) != null; } String formatDecimal(double value) { if (value % 1 == 0) return value.toStringAsFixed(0).toString(); return value.toString(); } double parseNumeric(String value) { return double.tryParse(value) ?? 0; }