TransactionFn<T extends DataModel<T> > typedef
The transaction function definition.
All transaction get either the data
or null and must return data or null.
If data is returned, it's DataModel.id
must be the same as the
transaction id
. If this method throws, the transaction is aborted.
Implementation
typedef TransactionFn<T extends DataModel<T>> = FutureOr<T?> Function(
String id,
T? data,
);