Creates an adapter for placing a specific RenderBox in the widget tree.
The renderBox
argument must not be null.
Source
WidgetToRenderBoxAdapter({ @required RenderBox renderBox, this.onBuild }) : renderBox = renderBox, // WidgetToRenderBoxAdapter objects are keyed to their render box. This // prevents the widget being used in the widget hierarchy in two different // places, which would cause the RenderBox to get inserted in multiple // places in the RenderObject tree. super(key: new GlobalObjectKey(renderBox)) { assert(renderBox != null); }