Skip to content

Own HTML parser package #562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
daniellampl opened this issue Feb 26, 2021 · 4 comments
Closed

Own HTML parser package #562

daniellampl opened this issue Feb 26, 2021 · 4 comments

Comments

@daniellampl
Copy link

It would be great to separate the HTMLParser and all its logic into a separate package.

Often we just need to display a handful of different html elements in our apps. By adding the flutter_html package to a project we also get a bunch of dependencies we might never need, like chewie_audio or css_colors (which wasn't touched since 2018 btw.)

The idea is to create a Widget that takes a Map of styles for the converted widgets and a Map of custom renderers to also render html elements in a completely customizable way. The flutter_html package uses this separate package for rendering and building the given html elements and applying the default styling.

This wouldn't be that much work and would allow users to use this already nice package without adding unneeded dependencies to their projects.

@erickok
Copy link
Contributor

erickok commented Feb 26, 2021

I think what you're asking for is modularisation, such that at the core can render basic tags and perform some styling, yes dependencies such as webview, svg, audio and video are opt in.

This is indeed very important and we have a discussion issue on this already. I also have a good idea how to do this (though I wouldn't call it easy...). We wanted to get the library is a healthy (if big) state first, and deal with the hundreds of issues that were open. As of 1.3.0 we have mostly done that, so the time is almost there. Just nullability and some bug fixing will come first.

@daniellampl
Copy link
Author

Of course, it wouldn't be easy but it would bring a huge amount of value for a manageable amount of work.

We enjoy using ´flutter_html´ a lot and adding the ability to use the HTML parsing part without adding those dependencies and providing the extra amount of flexibility would be really nice.

@erickok
Copy link
Contributor

erickok commented Feb 26, 2021

Absolutely. Fully agreed.

@erickok
Copy link
Contributor

erickok commented Mar 16, 2021

Duplicate of #442 - see #323 for a discussion.

@erickok erickok closed this as completed Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants