snapshot method

Future<Press> snapshot()

Reads a complete immutable snapshot.

Implementation

Future<Press> snapshot() {
  final loading = _loading;
  if (loading != null) return loading;
  late final Future<Press> current;
  current = _readSnapshot().whenComplete(() {
    if (identical(_loading, current)) _loading = null;
  });
  _loading = current;
  return current;
}