selectTag method
Future<void>
selectTag(
- MenuElement tagElement,
- TagRenderer<Widget> tagRenderer
)
Implementation
Future<void> selectTag(MenuElement tagElement, TagRenderer tagRenderer) async {
emit(state.copyWith(
activeElement: tagElement,
activeTagRenderer: tagRenderer,
canChangeContentType: tagRenderer.availableNuiWidget.isAny,
));
final String example = tagRenderer.example.replaceAll(_prettyCodeRegExp, '>\n').trim();
await initFromModel(
ScreenContentModel(
content: example,
contentType: tagRenderer.availableNuiWidget.isScrollable ? ScreenContentType.scrollable : ScreenContentType.stack,
),
);
}