flutter_native_splash
flutter_native_splash copied to clipboard
REFACTOR: Using html parser to update index.html file
Changes
- Using
html
package to read index.html file as a document tree - Modifying content using document methods
- Writing document back to index.html file
Advantages
- Easy to understand code
- Would still work if index.html file is edited by user
- Cleaner code
@OutdatedGuy I really like the work you did here, thanks! I agree that your approach is a better one. However, the thing that scares me is that html hasn't been updated in a year and a half, and it has a lot of outstanding issues. I wonder if it is preferable to keep the bad code I know instead of the potential worse problems with html
that I don't know?
I got your point. The html package is indeed not maintained.
So how about publishing this commit as a breaking change pre-release version. Like 3.0.0-beta
So others can manually test it.
@jonbhanson any updates on this?
I manually checked the package for different html formats and it seems to work fine. Also as this is a flutter project, generally the index.html
file won't have much included, so I don't see any problem for now.