txn<T> method
- Future<
T> action()
Completes the provided action
as a db transaction.
Implementation
Future<void> txn<T>(Future<T> Function() action) async {
if (isClosed || db == null) {
return;
}
await _caught(db?.transaction(action));
}