Skip to content

Conversation

@ndonkoHenri
Copy link
Contributor

Close #1638

Example:

import flet as ft


def main(page: ft.Page):
    page.window_height, page.window_width = 160, 200

    page.add(
        ft.Switch(
            thumb_color={
                ft.MaterialState.HOVERED: ft.colors.GREEN,
                ft.MaterialState.FOCUSED: ft.colors.RED,
                ft.MaterialState.DEFAULT: ft.colors.BLUE,
            },
            thumb_icon={
                ft.MaterialState.SELECTED: ft.icons.CHECK,
                ft.MaterialState.DEFAULT: ft.icons.CLOSE,
            },
        )
    )


ft.app(target=main)

Capture:
thumbIcon

@FeodorFitsner FeodorFitsner merged commit 3b829ae into flet-dev:main Nov 21, 2023
@ndonkoHenri ndonkoHenri deleted the switch-thumb-icon branch November 21, 2023 19:31
zrr1999 pushed a commit to zrr1999/flet that referenced this pull request Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Switch.thumb_icon

2 participants