Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Local variable for "serviceWorkerVersion" is deprecated

Tags:

flutter

I just upgraded to Flutter 3.22.0 and am getting the following error when running my Flutter web app on chrome:

Warning: In index.html:84: Local variable for "serviceWorkerVersion" is deprecated. Use "{{flutter_service_worker_version}}" template token instead.

Any ideas on how to fix this?

like image 517
MRR Avatar asked Aug 30 '26 14:08

MRR


1 Answers

  1. Delete content under /web directory
  2. Run flutter create . --platforms=web to create a new index.html file, together with all the other files necessary

source: Upgrading an older project

like image 65
Claudiu Razlet Avatar answered Sep 01 '26 08:09

Claudiu Razlet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!