getSize method

Future<int> getSize()

Implementation

Future<int> getSize() {
  if (_cachedSize != null) {
    return Future.value(_cachedSize);
  }
  return query.count().then((value) {
    _cachedSize = value;
    return value ?? 0;
  });
}