uninstall method

  1. @override
void uninstall()
override

Tear down the hook (test isolation).

Implementation

@override
void uninstall() {
  if (!_installed) return;

  // 3. Restore both handlers symmetrically.
  FlutterError.onError = _previousFlutterOnError;
  PlatformDispatcher.instance.onError = _previousPlatformOnError;
  _installed = false;
}