addTestView method

void addTestView(
  1. FlutterView view
)

Adds a TestFlutterView that wraps the given view to the list of views managed by this TestPlatformDispatcher.

The added view will be associated with the first display in the list of displays managed by this TestPlatformDispatcher.

Implementation

void addTestView(FlutterView view) {
  _testViews[view.viewId] = TestFlutterView(
    view: view,
    platformDispatcher: this,
    display: displays.first,
  );
  _updateViewsAndDisplays();
}