getCachedList<T> static method

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

Get cached list

Implementation

static List<T>? getCachedList<T>(String key) {
  final data = getCachedData<List<dynamic>>(key);
  if (data == null) return null;

  try {
    return data.cast<T>();
  } catch (e) {
    removeCachedData(key);
    return null;
  }
}