afterRollback method
Adds a task that will be executed after the transaction is rolled back.
- Note:
task
will be executed directly if the transaction was rolled back.
Implementation
void afterRollback(FutureOr task(error)) {
if (_closed) {
if (_error != null)
Timer.run(() => _invokeTaskWith(task, _error));
return;
}
(_afterRollbacks ??= <_ErrorTask>[]).add(task);
}