logErrorDetails method
Logs 'every' error as the error count is reset.
Implementation
@override
void logErrorDetails(FlutterErrorDetails details, {bool? force}) {
//
if (logStateXError || (force ?? false)) {
// Don't when in DebugMode.
if (!kDebugMode) {
// Resets the count of errors to show a complete error message not an abbreviated one.
FlutterError.resetErrorCount();
}
// https://docs.flutter.dev/testing/errors#errors-caught-by-flutter
// Log the error.
FlutterError.presentError(details);
} else {
// Won't log this time with this call.
logStateXError = true; // Next time.
}
// Optionally call super for debugPrint()
// Record the triggered event
assert(() {
if (_debugPrintEvents) {
debugPrint(
'$_consoleLeadingLine logErrorDetails() in $_consoleClassName');
}
return true;
}());
}