A web app built with flutter has a very large bundle size and can take a long time to load. In my use-case this is not really a problem, users won't bounce. But I'd like to avoid them staring at a white screen for something like 5-10 seconds, without any feedback.
How can I display an HTML/CSS based loading spinner until my flutter web app is loaded?
The web app is embedded into web/index.html. I've already included a small Javascript snippet that asks users for confirmation before reloading the page. This is executed properly.
Here I've found a nice self-container html and css spinner: https://projects.lukehaas.me/css-loaders/
If I add the spinner to an empty html template, it works fine.
But if I add it to the body of web/index.html it's not visible on the screen.
When using "inspect element" to look at the DOM, I can see that the spinner is loaded, but covered by the flutter canvaskit renderer.
It seems to me that flutter sets up the div for this renderer almost instantly at page load, and then takes a long time to load the remaining ressources.
Is it possible to have a loading spinner that is displayed until flutter has finished all its preparations?
