controller property Null safety

PlatformViewController controller

The controller for this render object.

Implementation

PlatformViewController get controller => _controller;
void controller=(covariant PlatformViewController controller)
covariant

This value must not be null, and setting it to a new value will result in a repaint.

Implementation

set controller(covariant PlatformViewController controller) {
  assert(controller != null);
  assert(controller.viewId != null && controller.viewId > -1);

  if (_controller == controller) {
    return;
  }
  final bool needsSemanticsUpdate = _controller.viewId != controller.viewId;
  _controller = controller;
  markNeedsPaint();
  if (needsSemanticsUpdate) {
    markNeedsSemanticsUpdate();
  }
}