convertNullableMIList<T> function
for use with MapsIndoors objects
Implementation
List<T>? convertNullableMIList<T>(
List<dynamic>? data, T? Function(dynamic) fromJson) {
if (data == null) {
return null;
}
final List<T> list = List.empty(growable: true);
for (final item in data) {
final T? convert = fromJson(item);
if (convert != null) {
list.add(convert);
}
}
return list;
}