attachRootWidget method Null safety
- Widget rootWidget
override
Takes a widget and attaches it to the renderViewElement, creating it if necessary.
This is called by runApp to configure the widget tree.
See also:
- RenderObjectToWidgetAdapter.attachToRenderTree, which inflates a widget and attaches it to the render tree.
Implementation
@override
void attachRootWidget(Widget rootWidget) {
// This is a workaround where screenshots of root widgets have incorrect
// bounds.
// TODO(jiahaog): Remove when https://github.com/flutter/flutter/issues/66006 is fixed.
super.attachRootWidget(RepaintBoundary(child: rootWidget));
}