getList<T> method

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

Access a List value.

Returns null if there is no such key or if it is not a List.

Implementation

List<T>? getList<T>(String key) {
  if (get(key) is! List) {
    return null;
  }

  return List<T>.from(get(key));
}