flutter_widget_from_html
flutter_widget_from_html copied to clipboard
After rendering with customWidgetBuilder, there was a line break
HtmlWidget( ''' Inline block level label content (mandatory no line breaks) Line level label content (automatic no line breaks) ''', customWidgetBuilder: (context) { print('element=============$context'); final document = parse(context.innerHtml);
final tag = context.localName;
final attributes = context.attributes;
if (tag == 'span') {
return
Text(
'Text content',
softWrap: false,
);
}
return null;
},
);
If you want to keep the new widget on the same line, it should be possible to wrap your Text widget inside a InlineCustomWidget.