Skip to content
Discussion options

You must be logged in to vote

Angles should be in radians, not degrees:

import math

import flet as ft


def main(page: ft.Page):
    page.title = "Flet counter example"
    page.vertical_alignment = ft.MainAxisAlignment.CENTER

    txt_number = ft.TextField(value="0", text_align=ft.TextAlign.RIGHT, width=100)

    def minus_click(e):
        txt_number.value = str(int(txt_number.value) - 1)
        page.update()

    def plus_click(e):
        txt_number.value = str(int(txt_number.value) + 1)
        page.update()

    page.add(
        ft.Row(
            [
                ft.IconButton(
                    ft.icons.ARROW_BACK_IOS,
                    on_click=minus_click,
                    rotate=ft.Rotate(angle=0.5

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by andreizolotarev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3182 on May 03, 2024 18:36.