TestPlatformDispatcher constructor

TestPlatformDispatcher({
  1. required PlatformDispatcher platformDispatcher,
})

Constructs a TestPlatformDispatcher that defers all behavior to the given PlatformDispatcher unless explicitly overridden for test purposes.

Implementation

TestPlatformDispatcher({
  required PlatformDispatcher platformDispatcher,
}) : _platformDispatcher = platformDispatcher {
  _updateViewsAndDisplays();
  _platformDispatcher.onMetricsChanged = _handleMetricsChanged;
  _platformDispatcher.onViewFocusChange = _handleViewFocusChanged;
}