attachRootWidget method Null safety

  1. @override
void attachRootWidget(
  1. 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:

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));
}