nextBatch method

Future<List> nextBatch()

Implementation

Future<List<dynamic>> nextBatch() async {
  while (_result.isEmpty && _hasMore) {
    await _more();
  }

  if (_result.isEmpty) {
    return null;
  }

  final result = _result;
  _result = [];
  return result;
}