Skip to content

bug: ButtonStyle in TextButton has no effect #6047

@lastdayafter

Description

@lastdayafter

Duplicate Check

Describe the bug

Applying ButtonStyle to TextButton has no effect.

Code sample

Code
import flet as ft


def main(page: ft.Page):
    page.window.width = 400
    page.window.height = 400
    page.vertical_alignment = ft.MainAxisAlignment.CENTER
    page.horizontal_alignment = ft.CrossAxisAlignment.CENTER

    page.add(
        ft.TextButton(
            content='test_button_0',
            style=ft.ButtonStyle(
                bgcolor=ft.Colors.WHITE,
                color=ft.Colors.BLACK,
                shape=ft.RoundedRectangleBorder(0),
            )
        )
    )


if __name__ == '__main__':
    ft.run(main)

To reproduce

Run the code

Expected behavior

No response

Screenshots / Videos

Captures Image

Operating System

macOS

Operating system details

26.2

Flet version

0.80.1

Regression

I'm not sure / I don't know

Suggestions

No response

Logs

No response

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions