Customizing web app initialization

Platform integration

Web

Customizing web app initialization

Getting started

Customizing web app initialization

Loading the entrypoint
Initializing the engine

Skipping this step

Example: Display a progress indicator

Upgrading an older project

You can customize how a Flutter app is initialized on the web
using the _flutter.loader JavaScript API provided by flutter.js.
This API can be used to display a loading indicator in CSS,
prevent the app from loading based on a condition,
or wait until the user presses a button before showing the app.

The initialization process is split into the following stages:

Fetches the main.dart.js script and initializes the service worker.

Initializes Flutter’s web engine by downloading required resources
such as assets, fonts, and CanvasKit.