Circular/radial slider control for Flet, wrapping sleek_circular_slider Flutter package
Project description
flet-circular-slider
A circular/radial slider control for Flet, wrapping the sleek_circular_slider Flutter package.
Install
pip install flet-circular-slider
Then register it as a Flet extension in your project's pyproject.toml so the Flutter widget gets compiled:
[project]
dependencies = ["flet-circular-slider>=0.1.0"]
[tool.flet.dev_packages]
flet-circular-slider = ">=0.1.0"
Then run flet build (see Building below). flet run alone won't compile extensions — you'll get "Unknown control" without a build step.
Quick Start
import flet as ft
from flet_circular_slider import FletCircularSlider
def main(page: ft.Page):
page.bgcolor = "#1a1a2e"
slider = FletCircularSlider(
min=0, max=100, value=25, size=200,
on_change=lambda e: print(int(float(e.data))),
)
page.add(slider)
ft.run(main)
Examples
- basic.py — Minimal slider with
on_changeevent - advanced.py — Custom colors, geometry, labels, sizing, and all three events
Properties
| Property | Type | Default | Description |
|---|---|---|---|
min |
float |
0 |
Minimum value |
max |
float |
100 |
Maximum value |
value |
float |
50 |
Initial value |
size |
float |
150 |
Diameter in pixels |
start_angle |
float |
150 |
Arc start angle (degrees) |
angle_range |
float |
240 |
Arc total range (degrees) |
counter_clockwise |
bool |
False |
Reverse drag direction |
animation_enabled |
bool |
True |
Animate to initial value |
progress_bar_width |
float |
size/10 |
Progress arc width |
track_width |
float |
bar/4 |
Background track width |
handler_size |
float |
bar/5 |
Drag handle size |
progress_bar_start_color |
ColorValue |
purple | Gradient start color |
progress_bar_end_color |
ColorValue |
pink | Gradient end color |
track_color |
ColorValue |
light purple | Track color |
dot_color |
ColorValue |
white | Handle dot color |
shadow_color |
ColorValue |
blue | Shadow color |
hide_shadow |
bool |
False |
Remove the shadow |
inner_text_color |
ColorValue |
gradient end | Center text color |
inner_text |
str |
raw value | Center text ({value} placeholder) |
top_label |
str |
none | Label above center |
bottom_label |
str |
none | Label below center |
Events
| Event | e.data |
Description |
|---|---|---|
on_change |
current value | Fires continuously while dragging |
on_change_start |
value at drag start | Fires once when drag begins |
on_change_end |
value at drag end | Fires once when drag ends |
Building
Custom Flet extensions require flet build to compile Dart/Flutter code. flet run alone shows "Unknown control" because it uses a pre-built binary.
flet build web # no extra tooling needed
flet build windows # requires Visual Studio C++ workload
flet build apk # Android
flet build macos # macOS
After building, flet run works for Python-only changes. Rebuild when you change Dart code.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flet_circular_slider-0.1.1.tar.gz.
File metadata
- Download URL: flet_circular_slider-0.1.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e74a332b7d827f0f51d7035cc90ef1001971a7d2e1261ae10896dc54a73cac02
|
|
| MD5 |
a5a03296e446f780b3dc934298766865
|
|
| BLAKE2b-256 |
2e0cea2ae5d1d7b9792d61fd34b657110dac7883036960c6159ce7095d0e4ffa
|
File details
Details for the file flet_circular_slider-0.1.1-py3-none-any.whl.
File metadata
- Download URL: flet_circular_slider-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2945981dc3f9d258da97a15e93b9bfb91377438402bc8b9643d2583d503b9221
|
|
| MD5 |
d08779ea3e9050256ada18b8f9848db6
|
|
| BLAKE2b-256 |
a1ee5b9ce9f83e830bee28ca0e666bc2df74b149288bad05df6ea128b926a9df
|