I do this in my project via the web interface:
...
<body>
<template if="showApplication">
<span>The app is ready.</span>
</template>
</body>
...
@observable bool showApplication = false;
main() {
// Initialize...
window.indexedDB.open(...).then((_) {
showApplication = true;
});
}
This also has an added bonus: individual code / website components can also check the status of the application before relying on a db connection, etc.