widgetByString method
Implementation
Widget widgetByString(String value) {
switch (value) {
case dataParagraph:
var key = GlobalKey<ParagraphHtmlWidgetState>();
return ParagraphHtmlWidget(
key: key,
);
case dataSubtitle:
var key = GlobalKey<SubtitleHtmlWidgetState>();
return SubtitleHtmlWidget(
key: key,
);
case dataImage:
var key = GlobalKey<ImageHtmlWidgetState>();
return ImageHtmlWidget(
key: key,
getImageUrl: widget.getImageUrl,
);
case dataListData:
var key = GlobalKey<ListDataHtmlWidgetState>();
return ListDataHtmlWidget(
key: key,
);
default:
return const SizedBox();
}
}