Replace Appstartup screen with a Custom Flutter Widget
Duplicate Check
- [x] I have searched the opened issues and there are no duplicates
Describe the requested feature
I want to produce my own startup screen instead of the progress ring with a text. I want to add my own flutter widget through the build template.
Suggest a solution
Atleast can u put the startup screen mechanism in the flet build template instead putting it in the main flet package.
Screenshots
No response
Additional details
No response
Implemented in Flet 0.86.0+ through #6616.
You can now replace the boot/startup screen with your own Flutter widget through a Flet extension. This screen appears while the packaged app is starting, before the first Python-driven page is displayed, and can contain your own layout, branding, and animations.
To use this:
-
Override
FletExtension.createBootScreen()in your extension’s Dart code and return your custom widget for a chosen name. -
Add the extension to your app’s dependencies.
-
Select that name in the app’s
pyproject.toml:[tool.flet.boot_screen] name = "my_screen" [tool.flet.boot_screen.my_screen] bgcolor = "#101020"my_screenmust match the name handled by your extension. The second table contains options passed to your widget. -
Rebuild the app with
flet build <platform>to include the extension and configuration.
The widget receives startup status updates, including the preparation/startup stage and any startup error. Flet manages removing the boot screen when the app is ready. The custom boot-screen guide includes a complete implementation.
For a working example, see the SpinKit boot screen and its Flutter widget source. You can also use that animated loader directly by adding flet-spinkit as a dependency and selecting name = "spinkit".