create static method
Implementation
static BaseWidget create(String? widgetName) {
if (widgetName == null) {
return BlankWidget(reason: "Not found widget name");
}
WidgetFactory? factory = _factories[widgetName.toLowerCase()];
BaseWidget? widget = factory?.call();
if (widget == null) {
return BlankWidget(reason: "Unsupported widget $widgetName");
}
return widget;
}