closeScope method
Future<void>
closeScope(
- LogScope scope, {
- required bool success,
- required Duration duration,
- Object? error,
- StackTrace? stackTrace,
override
Ends a scoped operation.
Implementation
@override
Future<void> closeScope(
LogScope scope, {
required bool success,
required Duration duration,
Object? error,
StackTrace? stackTrace,
}) async {
if (isInteractiveTerminal) {
_clearSpinnerLine();
scopeStack.removeWhere((s) => s.scope.id == scope.id);
if (scopeStack.isEmpty) _stopTimer();
stdout.writeln(formatScopeComplete(scope, success, duration));
_drawSpinner();
} else {
stdout.writeln(formatScopeEnd(scope, success, duration));
}
}