logWarning method
void
logWarning({
- StackTrace? stackTrace,
- required String file,
- required String event,
- required String warning,
Logs a warning with a stackTrace
in a specific file
during a specific event
.
Implementation
void logWarning({
StackTrace? stackTrace,
required String file,
required String event,
required String warning,
}) {
if (kReleaseMode) {
return;
}
stackTrace ??= StackTrace.current;
log(
"Warning occurred in file $file during event: $event",
level: 900,
error: warning,
stackTrace: stackTrace,
);
}