verify_flet_code
Verifies Flet code by combining static analysis and sandboxed execution to catch invalid controls, property typos, and runtime errors before delivery.
Instructions
Verify Flet code against the INSTALLED flet — ALWAYS call this before delivering Flet code to the user. Two passes: (1) static analysis for unknown controls, invalid constructor properties, enum typos, deprecated usage and undefined event handlers, each with line numbers and hints; (2) sandboxed execution that constructs the controls (app launchers are neutralized, nothing opens) and fires flet's own validators, catching errors that only appear at runtime (e.g. Slider(min > max)). Fix every diagnostic and re-verify until status == 'passed'.
Args: code: Complete, runnable Flet app code (a main(page) function plus ft.app(main) is ideal — main is invoked against a mock page). timeout_secs: Execution timeout for the sandbox (default 15, max 60).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| timeout_secs | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| checks | Yes | ||
| status | Yes | ||
| diagnostics | Yes | ||
| duration_ms | Yes | ||
| flet_version | Yes | ||
| controls_verified | Yes |