attachRootWidget method

void attachRootWidget(
  1. Widget rootWidget
)

Takes a widget and attaches it to the rootElement, creating it if necessary.

This is called by runApp to configure the widget tree.

See also:

Implementation

void attachRootWidget(Widget rootWidget) {
  attachToBuildOwner(RootWidget(
    debugShortDescription: '[root]',
    child: rootWidget,
  ));
}