renderView property

  1. @Deprecated('Consider using RendererBinding.renderViews instead as the binding may manage multiple RenderViews. ' 'This feature was deprecated after v3.10.0-12.0.pre.')
RenderView renderView
latefinal

Deprecated. Will be removed in a future version of Flutter.

This is typically the root of the render tree bootstrapped by runApp.

However, by default this render view is not associated with any PipelineOwner and therefore isn't considered during frame production. It is also not registered with this binding via addRenderView. Wiring this up is left as a responsibility for a higher level. The WidgetsBinding, for example, sets this up in WidgetsBinding.wrapWithDefaultView, which is called indirectly from runApp.

Apps that don't use the WidgetsBinding or don't call runApp (or WidgetsBinding.wrapWithDefaultView) must manually assign a PipelineOwner to this RenderView, make sure the pipeline owner is part of the pipeline owner tree rooted at rootPipelineOwner, and call addRenderView if they want to use this deprecated property.

Instead of interacting with this deprecated property, consider using renderViews instead, which contains all RenderViews managed by the binding.

Implementation

@Deprecated(
  'Consider using RendererBinding.renderViews instead as the binding may manage multiple RenderViews. '
  'This feature was deprecated after v3.10.0-12.0.pre.'
)
// TODO(goderbauer): When this deprecated property is removed also delete the _ReusableRenderView class.
late final RenderView renderView = _ReusableRenderView(
  view: platformDispatcher.implicitView!,
);