Moving a Project to Flet 1.0¶
Older mobile projects use Flet 0.28. They keep working as they are: Whittl still runs and builds Flet 0.28 projects, and never moves one on its own.
Flet 1.0 is not a drop-in upgrade. Many 0.28 forms are gone (ft.app, ElevatedButton, page.open, page.client_storage among them), and code written for one version does not run on the other. Whittl does the move with you, and keeps the 0.28 version so you can go back.
Why move¶
- Packages with compiled parts (Pillow, NumPy, pandas) work in the APK.
- A smaller APK, and a launch splash you choose.
- The AI can take a picture of the running app to check its work.
- Flet 0.28 is the older version; new Flet features arrive in 1.x.
See the table in Mobile Apps (Flet).
How to move a project¶
- Open the project.
- In the chat, ask for it in your own words, for example: move this project to Flet 1.0.
-
Whittl asks before anything changes:
The AI wants to move this project from Flet 0.28 to Flet 1.0. Whittl archives the project first as "v0.28 (before Flet 1.0)" (restore it to go back), switches it to Flet 1.0, changes the old forms it can change by itself, and then starts a turn that finishes the rest with the Flet 1.0 rules. The first run downloads Flet 1.0 (about 70 MB, once). Move it?
-
Click Allow. Click Don't allow and the project stays on Flet 0.28; the AI carries on with the rest of what you asked, in 0.28.
The AI is only offered the move on a Flet 0.28 project, and only uses it when you ask for the move. It never moves a project to fix an error.
What happens after Allow¶
When the current turn ends, Whittl:
- Archives the project as v0.28 (before Flet 1.0) in the Archives tab.
- Switches the project to Flet 1.0. From here the AI gets the Flet 1.0 rules and skills.
- Makes the mechanical changes itself: changes that need no judgement, such as
ft.app(target=main)toft.run(main),ElevatedButtonand the helpers Flet 1.0 removed (ft.alignment.center,ft.padding.all...), keywords that changed (text=tocontent=), and a few renamed color names. - Gets Flet 1.0 ready: Flet 1.0, the extensions the app imports and the desktop window, downloaded once.
- Starts a new turn that tells the AI what was changed and what is still in the 0.28 form, then reads the files, changes the rest, runs the app, looks at it and fixes what fails.
Measured on 19 real Flet projects before release: the mechanical step broke none of them, and about four in ten started under Flet 1.0 before the AI turn began. The AI turn does the rest, so expect it to take a while on a big project.
If you press Stop before the turn ends, the move is not done and the chat says so; ask again to move it.
Going back¶
Open the Archives tab and restore v0.28 (before Flet 1.0). The archive remembers that it was a Flet 0.28 project, so restoring it puts the project back on Flet 0.28 as well as the code.
After the move¶
- Click Test Run. The first run of a Flet 1.0 project downloads Flet 1.0 and its window if they are not there yet. On Linux the Flet 1.0 window needs a few system libraries; if one is missing, Whittl says which and gives the
aptcommand (see On Linux). - The AI's checks, its scripts and the test gate use the project's Flet 1.0 as well.
- Check the parts you use most. The move keeps what the app does, but a control can look a little different in Flet 1.0.
- Build a new APK. Use the same Package ID as before (Whittl makes it from the project's name, so it is the same unless you changed it) and the phone updates the app instead of installing a second copy. See Building an Android APK.