set<T> method

Future<T> set<T>(
  1. String path,
  2. String? name,
  3. T item, {
  4. CacheToJson<T>? toJson,
  5. Duration? maxAge,
  6. bool isPersistent = false,
})

Implementation

Future<T> set<T>(
  String path,
  String? name,
  T item, {
  CacheToJson<T>? toJson,
  Duration? maxAge,
  bool isPersistent = false,
}) =>
    _documentRef(path, name, isPersistent: isPersistent)
        .set(_zip(item, maxAge, toJson))
        .then((value) => item);