view property

Widget? view

The widget that defines the view anchored to this widget.

Typically, a View or ViewCollection widget is used, which may be wrapped in other non-RenderObjectWidgets (e.g. InheritedWidgets).

An example use case for this widget is a tooltip for a button. The tooltip should be able to extend beyond the bounds of the main view. For this, the tooltip can be implemented as a separate View, which is anchored to the button in the main view by wrapping that button with a ViewAnchor. In this example, the view slot is configured with the tooltip View and the child is the button widget rendered into the surrounding view.


final Widget? view;