fluttercommunity / wakelock_plus

Flutter plugin that allows you to keep the device screen awake on Android, iOS, macOS, Windows, Linux, and web.
BSD 3-Clause "New" or "Revised" License
71 stars 54 forks source link

fix: add support for non-root base-href #75

Open holzgeist opened 2 months ago

holzgeist commented 2 months ago

Description

if a web-app is deployed using --base-href=/path/to/deployed/flutter/app during build, the URLs starting with ./assets won't work anymore. Using assetManager will properly resolve them. It uses assetBase from the loader config specified here

NB :warning:

I only tested the url.startsWith('assets/') code path as it's the only one used in the library. It should work the same for ./ though

diegotori commented 1 month ago

@holzgeist Please let me know if you're still gonna work on this change. Otherwise, I can commandeer it for you and take it to the finish line. Thanks.

holzgeist commented 1 month ago

Hi @diegotori ,

thanks for the feedback. I'm going to work on it, probably today, maybe tomorrow

holzgeist commented 1 month ago

@diegotori actually I need to solve some other issues before I have a working web-build to test this one. If you could commandeer this, it would be great, thanks :pray: