Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CupertinoRadio control and Radio.adaptive #2225

Merged
merged 4 commits into from
Dec 12, 2023
Merged

Conversation

ndonkoHenri
Copy link
Contributor

Close #2201

Test Code:

import flet as ft


def main(page):
    def button_clicked(e):
        t.value = f"Your favorite color is:  {cg.value}"
        page.update()

    t = ft.Text()
    b = ft.ElevatedButton(text="Submit", on_click=button_clicked)
    cg = ft.RadioGroup(
        content=ft.Column(
            [
                ft.CupertinoRadio(value="red", label="Red - Cupertino Radio", active_color=ft.colors.RED),
                ft.Radio(value="green", label="Green - Material Radio", fill_color=ft.colors.GREEN),
                ft.Radio(value="blue", label="Blue - Adaptive Radio", adaptive=True, active_color=ft.colors.BLUE),
            ]
        )
    )

    page.add(ft.Text("Select your favorite color:"), cg, b, t)


ft.app(target=main)

@ndonkoHenri ndonkoHenri added enhancement Improvement/Optimization controls labels Dec 11, 2023
@FeodorFitsner FeodorFitsner merged commit 191478f into main Dec 12, 2023
3 checks passed
@FeodorFitsner FeodorFitsner deleted the cupertino-radio branch December 12, 2023 18:51
zrr1999 pushed a commit to zrr1999/flet that referenced this pull request Jul 17, 2024
* CupertinoRadio control

* Radio.adaptive

* Radio.active_color

* create cupertino_radio.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
controls enhancement Improvement/Optimization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CupertinoRadio control
2 participants