error abstract method
Logs a critical error message along with the associated error object and stack trace.
Use this when an operation fails completely or a caught exception needs to be explicitly tracked and handled.
Implementation
void error(String message, {Object? error, StackTrace? stackTrace});