dispose method

void dispose()

Tears down the test fixtures. Called automatically by testWidgets from package:fleury_test; tests that construct a FleuryTester manually must call this in their test teardown.

Implementation

void dispose() {
  if (_disposed) return;
  _disposed = true;
  _actionFrameTimer?.cancel();
  _actionFrameTimer = null;
  _terminalParser = null;
  final pendingFailure = _actionFrameFailure;
  if (pendingFailure != null && !pendingFailure.isCompleted) {
    pendingFailure.completeError(
      StateError('FleuryTester disposed during an action.'),
    );
  }
  try {
    _closeFrame();
  } finally {
    _teardown();
  }
}