lastFlutterError method
Record and return details of the 'last' handled error Not, simply retrieving the last error will 'clear' the storage.
Implementation
FlutterErrorDetails? lastFlutterError([FlutterErrorDetails? details]) {
FlutterErrorDetails? lastErrorDetails;
if (details == null) {
lastErrorDetails = _lastFlutterErrorDetails;
_lastFlutterErrorDetails = null; // Clear the storage for next time.
} else {
lastErrorDetails = _lastFlutterErrorDetails = details;
}
return lastErrorDetails;
}