maybeCastList<T> method

List<T>? maybeCastList<T>(
  1. String key
)

Implementation

List<T>? maybeCastList<T>(String key) {
  try {
    List<T> result = [];
    if (this[key] == null) return null;
    for (var e in (this[key] as List<dynamic>)) {
      result.add(e as T);
    }
    return result;
  } catch (e) {
    return null;
  }
}