Skip to content

bug: Dropdown cant change trailing_icon size #6018

@3mora2

Description

@3mora2

Duplicate Check

Describe the bug

Dropdown cant change trailing_icon size

Code sample

Code
import flet as ft


@ft.control()
class DropdownApp(ft.Dropdown):
    height: int = 24
    text_size: int = 14

    content_padding: int = 10
    selected_trailing_icon: ft.IconDataOrControl = ft.Icon(ft.Icons.ARROW_DROP_DOWN, size=20, height=10)
    trailing_icon: ft.IconDataOrControl = ft.Container(
        ft.Icon(ft.Icons.ARROW_DROP_UP, size=20, height=10, expand=1), bgcolor=ft.Colors.GREEN, expand=1
    )

@ft.control()
class DropdownM2App(ft.DropdownM2):
    height: int = 30
    text_size: int = 14
    content_padding: int = 10


if __name__ == '__main__':
    async def main(page: ft.Page):
        page.theme_mode = ft.ThemeMode.LIGHT
        ft.context.disable_auto_update()
        page.add(DropdownM2App(
            options=[
                ft.dropdown.Option(key='Option 1'),
                ft.dropdown.Option(key='Option 2'),
            ],
            value='Option 1'
        ))
        page.add(DropdownApp(
            options=[
                ft.dropdown.Option(key='Option 1'),
                ft.dropdown.Option(key='Option 2'),
            ],
            value='Option 1'
        ))



    ft.run(
        main=main
    )

To reproduce

...

Expected behavior

No response

Screenshots / Videos

Captures

[Upload media here]

Operating System

Windows

Operating system details

11

Flet version

0.80.1

Regression

No, it isn't

Suggestions

No response

Logs

Logs
[Paste your logs here]

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