controller property Null safety

AndroidViewController controller
override

The Android view controller for the Android view associated with this render object.

Implementation

@override
AndroidViewController get controller => _viewController;
void controller=(covariant AndroidViewController controller)
covariantoverride

Sets a new Android view controller.

Implementation

@override
set controller(AndroidViewController controller) {
  assert(!_isDisposed);
  assert(_viewController != null);
  assert(controller != null);
  if (_viewController == controller) {
    return;
  }
  _viewController.removeOnPlatformViewCreatedListener(_onPlatformViewCreated);
  super.controller = controller;
  _viewController = controller;
  _viewController.pointTransformer = (Offset offset) => globalToLocal(offset);
  _sizePlatformView();
  if (_viewController.isCreated) {
    markNeedsSemanticsUpdate();
  }
  _viewController.addOnPlatformViewCreatedListener(_onPlatformViewCreated);
}