clearContext method

void clearContext(
  1. String transactionId
)

Implementation

void clearContext(String transactionId) {
  final index = _contextStack.lastIndexWhere(
    (c) => c.transactionId == transactionId,
  );
  if (index >= 0) {
    final context = _contextStack.removeAt(index);
    try {
      context.cleanup();
    } finally {
      _ownedContexts.remove(context);
    }
  }
}