Test flet apps dev

From flet-dev/flet · View interactive version

Test flet apps dev is an AI agent skill from the GitHub repository flet-dev/flet. Use when testing or debugging Flet apps in maintainer/contributor development mode with local Python package sources and the local Flutter client, including web, desktop, browser, and computer-use verification workflows.

How to use this skill

Skill file

Test Flet Apps In Dev Mode

Use this skill when validating a Flet app, example, feature, or bug fix against

this repo's local Python packages and/or local Flutter client during maintainer

or contributor work.

Core model

Flet dev-mode testing usually has one or two processes:

  1. A Python Flet app/server, run from sdk/python.
  2. The local Flutter client, run from client, when Dart/client or extension code

must be tested.

If only Python code changed, uv run flet run ... is often enough. If Dart,

Flutter, extension, or transport code changed, run the local Flutter client so

the changed Dart code is actually used.

The local Flutter client debug build uses a fixed app-server URL from

client/lib/main.dart:

if (kDebugMode) {
  pageUrl = "http://localhost:8550";
}

Therefore, when using the local Flutter client without extra URL arguments,

start the Python app on port 8550.

Start the Python app

Run from {repo}/sdk/python:

uv run flet run -w -p 8550 examples/controls/core/interactive_viewer/handling_events/main.py

Adjust the sample path as needed. Use port 8550 when the local Flutter client

will connect with its default debug URL. Keep this process running and watch its

stdout for Python callback output, tracebacks, and event payloads.

For web-only checks with the packaged web client, open:

http://127.0.0.1:8550

Run the local Flutter client

Run these from {repo}/client.

Desktop

Use when validating native desktop behavior on the current host OS:

fvm flutter run -d macos     # macOS
fvm flutter run -d windows   # Windows
fvm flutter run -d linux     # Linux

The debug client defaults to http://localhost:8550 when no app URL argument is

provided. Use the platform target that exists on the current machine. Use

Computer Use or the relevant platform automation to navigate and interact with

the app window.

Flutter web in Chrome

Use when Dart web behavior must be validated in Flutter's default web debug

browser:

fvm flutter run -d chrome

This opens a fresh browser connected to the Python app server on port 8550.

Flutter web in another Chromium browser

If the requested browser is not listed by flutter devices, prefer the web

server target and open the served URL in that browser:

fvm flutter run -d web-server --web-hostname 127.0.0.1 --web-port 8660
open -a "Brave Browser" http://127.0.0.1:8660

Using CHROME_EXECUTABLE can work, but Flutter may fail to attach its debug

websocket in non-default Chromium browsers. Fall back to web-server if that

happens.

Browser and UI interaction

in-app browser or the Browser Use plugin when explicitly requested.

MCP is not the requested tool or cannot control that browser.

accessibility trees often expose only the HTML canvas container.

Reading evidence

Always inspect both sides:

exceptions, hot reload/restart status.

For client/server protocol bugs, compare the raw outgoing Dart event in Flutter

logs with the decoded Python event object in Python logs.

Hot reload and restart

For Flutter client sessions:

may be stale.

left running.

For Python app sessions, restart uv run flet run ... after Python source or

sample changes if the running process does not pick them up.

Troubleshooting

such as engine.stamp, rerun the same command with escalation.

and open the URL in the target browser.

root cause is often a handler exception.

treating it as a framework bug.

on port 8550 or pass an explicit app URL when the client path supports it.

Finish checklist

desktop target, target browser, or sample-only.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.