marcolav
marcolav

Reputation: 485

What is VM###_main.dart.js?

While developing a Flutter web app I came across a problem appearing only in release mode.

I use a provider containing a flag indicating when a particular screen is active: I set it to true during initState and to false on deactivation.

I discovered that leaving the page seems to act on main.dart.js but not on VM1141.main.dart.js (the number changes at every refresh of the page).

console.log

In this image you can see that switching the field to false only appears in main.dart.js.

What is this VM###.main.dart.js?

Why doesn't it receive the command when deactivating the screen, while main.dart.js does?

Upvotes: 1

Views: 226

Answers (1)

설렁탕S.L.T
설렁탕S.L.T

Reputation: 21

I've also encountered this issue.

I solved this issue by removing

<script src="main.dart.js" type="application/javascript"></script>

in my web/index.html

Upvotes: 2

Related Questions