You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[package_info_plus] Web: fail to get PackageInfo (version) offline #456
I have a PWA flutter application where I call await PackageInfo.fromPlatform() before running the app. This is the only part that is not working offline as it tries to trick the cache to force reading the version, since there is no network, it fails. I think it should try to read the version but on failure (no network), it should return a stale value as there is no reason we could not get the package name and version offline.
To reproduce, create a flutter app from the basic template, add await PackageInfo.fromPlatform() in main() publish somewhere, run it, turn of network and refresh...
Package Info Plus on web relies on the hosted version.json file to read the package info, so, if the app is offline it won't be able to obtain the package info. This works as expected.
Activity
ptisserand commentedon Oct 11, 2021
Can I work on this issue?
github-actions commentedon May 31, 2022
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days
dupuisdavid commentedon Jan 14, 2025
Hi.
Could you let me know if this issue has been solved?
Thanks for your feedback.
miquelbeltran commentedon Jan 14, 2025
Package Info Plus on web relies on the hosted
version.jsonfile to read the package info, so, if the app is offline it won't be able to obtain the package info. This works as expected.dupuisdavid commentedon Jan 14, 2025
ok, I understand. By the way, do you know if there are any initiatives for offline operation in the context of a PWA?
dupuisdavid commentedon Jul 7, 2025
Hi. Is there an update on this topic or not?
In the context of PWA app, the
version.jsonfile could cached...What do you think @miquelbeltran?
feat(package_info_plus): add opt-in compile-time package info accessor
feat(package_info_plus): add opt-in compile-time package info accessor