commit method

Future<List<Object?>> commit()

Commits this batch.

Only one commit or commitRange operation can run at once, other calls won't start before the ongoing commit ends.

Implementation

Future<List<Object?>> commit() async {
  assert(!_cursor._closed);
  final result = await _cursor._methodChannel
      .invokeListMethod<Object?>('commitGetBatch', {
    'operations': _operations,
  });
  _correctResult(result!);
  return result;
}