What problem does it solve?
Flet apps written imperatively mutate controls and call page.update() manually, which becomes hard to maintain as UI grows. This Skill ports such apps to Flet's declarative components mode, where UI is derived from state and manual updates are eliminated.
Core Features & Use Cases
- Entrypoint Migration: Replaces imperative main functions with a root @ft.component App rendered via page.render(App) in components mode.
- State Strategy Guidance: Chooses between @ft.observable models for nested app data and ft.use_state hooks for local ephemeral UI state.
- Componentization & Routing: Moves UI chunks into src/components, centralizes route handling in App, and converts dialogs to state-driven components without explicit page.update() calls.
- Use Case: You have a Trello-like Flet board app with drag-and-drop that calls page.update() everywhere; this Skill produces a sibling declarative folder using observable models for boards and cards.
Quick Start
Convert my imperative Flet app in the current folder to declarative components mode using flet.component, hooks, and observable state.