Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[webview_flutter] Fix issue where local and asset HTML files cannot be loaded #3693

Closed
wants to merge 13 commits into from

Conversation

Wian-TMC
Copy link

@Wian-TMC Wian-TMC commented Mar 9, 2021

This PR enables a way for local and asset HTML files to be loaded in by webview_flutter. This was initially completed by @asjqkkkk issue number #2583 but it requires a fresh PR as the branch has been closed.

  • Fixed loading local or asset HTML files

@google-cla google-cla bot added the cla: yes label Mar 9, 2021
@github-actions github-actions bot added p: webview_flutter Edits files for a webview_flutter plugin platform-android platform-ios labels Mar 9, 2021
@stuartmorgan
Copy link
Contributor

Thanks for the submission! We’re currently working through a large backlog of PRs, and this will require non-trivial review (since we need to evaluate whether there are API changes we need to make at the same time), so it will take some time before we’re able to review it. As explained in CONTRIBUTING.md, votes for the corresponding issue are the primary way we’re prioritizing non-trivial reviews, so we encourage you to file an issue and associate it with this PR.

It looks like this is trying to address the same underlying need as #3613, but with a significantly different approach; it might be useful to discuss and settle on a single PR.

From an initial look, having an explicit method for local content seems like a good approach. I would suggest not trying to solve asset path resolution in this context though; there are many cases where a developer might need to get paths from the assets folder, so embedding that logic in each plugin, vs. having a single place (e.g., path_provider), would be a maintenance issue. There are also non-trivial issues with getting that logic correct for various packaging sceranios such as add-to-app.

@Wian-TMC
Copy link
Author

@stuartmorgan I'm looking forward to the progress of this PR! Thank you for your insight

@Wian-TMC
Copy link
Author

Fix flutter/flutter#27086

This PR addresses this issue mentioned above

@stuartmorgan
Copy link
Contributor

@FelixYew Please read https://github.com/flutter/flutter/wiki/Tree-hygiene#how-to-review-code: "contributors without commit access are welcome to comment on PRs, but they should NOT be approving them in the GitHub UI"

@stuartmorgan
Copy link
Contributor

Closing as obsolete, since #4446, #4486, and to-be-written-soon follow-up PRs add local file handling based on discussion about how we want the suite of load APIs to interact. Thanks again for the submission though!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants