TransactionHandler<T> typedef
TransactionHandler<T> =
Future<T> Function(Transaction)
The function that FirebaseFirestore.runTransaction runs inside a transaction, and runs again for each retry.
It receives the Transaction to read and write with. The value its future completes with is what FirebaseFirestore.runTransaction returns. If it throws, the transaction is not committed.
Implementation
typedef TransactionHandler<T> = Future<T> Function(Transaction);