decodeList<T> static method
Decodes a list from JSON maps or method channel results, returning empty list if null.
Implementation
static List<T> decodeList<T>(List? value, T Function(Map) fromJson) {
if (value == null) return const [];
return value.map((e) => fromJson(e as Map)).toList();
}