flet
flet copied to clipboard
CupertinoSlidingSegmentedButton crashing (freezing) on selection.
Duplicate Check
- [X] I have searched the opened issues and there are no duplicates
Describe the bug
Clicking on any button of the CupertinoSlidingSegmentedButton will freeze the entire flet window on linux. Launching the same app with --web works as expected. The app is still running, just extremely slow (see picture) - multiple seconds per frame.
Code sample
Code
[Paste your code here]
To reproduce
import flet as ft
def main(page: ft.Page):
page.theme_mode = ft.ThemeMode.LIGHT
page.overlay.append(ft.AlertDialog(content=ft.Row(controls=[
ft.Column(controls=[
ft.Text("Title", theme_style=ft.TextThemeStyle.TITLE_LARGE),
], expand=1),
ft.VerticalDivider(),
ft.Column(controls=[
ft.Text("El test", theme_style=ft.TextThemeStyle.TITLE_LARGE),
ft.CupertinoSlidingSegmentedButton(
thumb_color=ft.colors.BLUE_400,
on_change=lambda e: print(f"selected_index: {e.data}"),
# padding=ft.padding.symmetric(0, 10),
controls=[
ft.Text("One"),
ft.Text("Two"),
ft.Text("Three")
],
),
], expand=1)
]), open=True))
page.update()
ft.app(main)
Expected behavior
No response
Screenshots / Videos
Captures
[Upload media here]
Operating System
Linux
Operating system details
PopOS 22.04 (Ubuntu based)
Flet version
0.24.1
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
Logs
[Paste your logs here]
Additional details
package:media_kit_libs_linux registered. selected_index: 0 selected_index: 1 selected_index: 2 selected_index: 1 selected_index: 0 ...
I'm unable to reproduce this via wsl2 (Ubuntu 22.04) on Windows. Are you running PopOS on a local or cloud VM?