Title: PWA hard refresh on version update (web publishing) - looking for working solution

Troubleshooting

Hi everyone,

I'm struggling with forcing PWA to refresh when I publish a new version of my FlutterFlow web app. Users on iOS Safari PWA don't see updates unless they manually clear cache or reinstall the PWA.

I've tried modifying main.dart with version checking and window.location.reload(), but Safari seems to ignore it. The PWA stays cached with the old version.

Has anyone found a reliable solution for this?

Looking for:

  • Working code snippet for main.dart that actually forces PWA refresh

  • Tested solution specifically for iOS Safari PWA

  • Any alternative approaches that work with FlutterFlow

Current approach that doesn't work:

  • Checking version in localStorage

  • Trying to force reload with window.location.reload(true)

Would really appreciate if someone could share their working implementation. This seems like a common issue but can't find a solution that works reliably.

Thanks!

What have you tried so far?

many changes in main.dart

Did you check FlutterFlow's Documentation for this topic?
Yes
5
1 reply