Fix for those guys who suffered from Unkown control: ....
while trying to build their own user extension⚡
#5508
Unanswered
pro-grammer-SD
asked this question in
Extensions
Replies: 1 comment
-
is these way to check correct build and installed custom (non Python) extension from code of running application? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Flet User Extension: Quick Start Guide
Works on any version at the times of writing the latest stable release is 0.28.3
This guide helps you build and run a Flet user extension from scratch.
1. Set Up the Folder Structure
Create a new folder named:
Then navigate into it:
2. Create the Extension Template
Run the following command to scaffold the extension:
3. Install the Extension Locally
Install the extension in editable mode:
4. Prepare the Example App
Change into the examples folder:
Edit
pyproject.toml
if needed:Convert any backslashes (
\
) to forward slashes (/
) in:[tool.flet.dev_packages]
[tool.uv.sources]
5. Build the App
From within the
examples/flet_your_extension_name_example
directory, run:Important Notes:
6. Confirm Extension Registration
During build, check logs for:
This confirms your extension was detected and registered properly.
7. Run the Example App
Navigate to the build output directory:
Run your app:
You should now see your custom extension rendered — for example:
inside a purple box. If so, you're all set.
You can also run the app using
flet-cli
from theexamples/flet_your_extension_name/
directory. This works and does not throw any errors anymore such as Unkown control: flet_your_extension_name.The command is:
I have seen that the common issue is to build from the
examples/flet_your_extension_name/src
directory which is a big RED flag as it will not fetch extension details frompyproject.toml
and will not work as thepyproject.toml
file is inexamples/flet_your_extension_name/
Beta Was this translation helpful? Give feedback.
All reactions