flutter_widget_from_html icon indicating copy to clipboard operation
flutter_widget_from_html copied to clipboard

Still facing the issue -customWidgetBuilder builds text on newline

Open aswathyMVP opened this issue 1 year ago • 3 comments

Steps to Reproduce

customWidgetBuilder: (element) { if (element.localName == 'img') { final src = element.attributes['src'] ?? ''; if (src.endsWith('.svg')) { /// Return the custom SVG widget return SvgPictureNetwork(src); } else if (element.localName == 'svg') { // Handle inline SVG final svgString = element.outerHtml; return SvgPictureNetwork(svgString); } } // Return null for other elements to use default handling return null; },

HTML
`HtmlWidget` configuration
Tesing environment

Expected results

Actual results

aswathyMVP avatar Aug 19 '24 12:08 aswathyMVP

https://github.com/daohoangson/flutter_widget_from_html/issues/779 Tried the solution mentioned but not worked

aswathyMVP avatar Aug 19 '24 12:08 aswathyMVP

Have you tried wrapping your custom widget inside InlineCustomWidget?

daohoangson avatar Sep 29 '24 11:09 daohoangson

by using InlineCustomWidget we can make it inline, but I am getting one more issue on this, that is if i have custom widget in this who has inkwell, and if the custom widget comes at start of the sentence, it actually make it partially clickable for some reason. do you have any solution for this @daohoangson

vishal0768 avatar Oct 25 '24 10:10 vishal0768