addWidget method

void addWidget(
  1. String routeName,
  2. WidgetBuilder? widgetBuilder
)

添加路由组件 routeName 路由名称 widgetBuilder 组件

Implementation

void addWidget(String routeName, WidgetBuilder? widgetBuilder) {
  if (routeName.isEmptyString || widgetBuilder == null) {
    return;
  }
  _routeWidgets[routeName] = widgetBuilder;
}