lastFlutterError method

FlutterErrorDetails? lastFlutterError([
  1. FlutterErrorDetails? details
])
inherited

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;
}