get method

Future<OutputType> get(
  1. String id, {
  2. bool? forceRefresh,
})

Implementation

Future<OutputType> get(String id, { bool? forceRefresh }) async {
  if ((forceRefresh == null || forceRefresh == false) && itemCache.containsKey(id)) {
    return itemCache[id]!;
  } else {
    Item item = await fetchItem(id);
    final outputItem = save(item);
    return outputItem;
  }
}