List<T>? listFromJson<T>( List<dynamic>? list, T Function(Map<String, dynamic> json) fromJson) => list?.map((e) => fromJson(e)).toList();