flutter_native_splash icon indicating copy to clipboard operation
flutter_native_splash copied to clipboard

REFACTOR: Using html parser to update index.html file

Open OutdatedGuy opened this issue 2 years ago • 2 comments

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 avatar Jul 21 '22 19:07 OutdatedGuy

@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?

jonbhanson avatar Jul 24 '22 14:07 jonbhanson

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.

OutdatedGuy avatar Jul 24 '22 15:07 OutdatedGuy

@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.

OutdatedGuy avatar Aug 06 '22 16:08 OutdatedGuy