safeGetList<T> method
Implementation
List<T>? safeGetList<T>(dynamic key) {
var value = this[key];
if (value is List) {
if (value.isEmpty) {
return List<T>.empty(growable: true);
}
return value
.whereType<T>()
.map((e) => e)
.toList(growable: true);
} else {
return null;
}
}