runInTransaction<R> static method

R runInTransaction<R>(
  1. Store store,
  2. TxMode mode,
  3. R fn(
    1. Transaction
    )
)

Exposes Store._runInTransaction to other libraries in this package.

This doesn't verify that the callback function isn't an async function for performance reasons. If not a concern, use runInTransaction instead!

Implementation

@pragma('vm:prefer-inline')
static R runInTransaction<R>(
  Store store,
  TxMode mode,
  R Function(Transaction) fn,
) => store._runInTransaction(mode, fn);