uninstall method

  1. @override
void uninstall()
override

Tear down the hook (test isolation).

Implementation

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

  SchedulerBinding.instance.removeTimingsCallback(_timingsCallback);

  // 3. A scheduled post-frame callback cannot be cancelled, so the drain
  //    stops itself: it reads `_installed` and declines to re-register.
  //    Its parked block maps go with it, and the join cursors restart
  //    together so a later re-install joins from a clean zero.
  _pendingBlocks.clear();
  _nextDrainKey = 0;
  _nextJoinKey = 0;
}