Dropdown.expanded_insets has no effect
Author: FeodorFitsnerCreated Sep 28, 2026Updated Sep 28, 2026
Labelsbugcontrols
Description
ft.Dropdown.expanded_insets is declared and documented in the Python SDK, but the Flutter client never reads it, so setting it has no effect.
- Python:
expanded_insets: Optional[PaddingValue] = None("The insets for the expanded dropdown menu"), insdk/python/packages/flet/src/flet/controls/material/dropdown.py:181 - Dart:
packages/flet/lib/src/controls/dropdown.dart:229derivesexpandedInsetsonly fromexpand:It then passes that value toEdgeInsets? expandedInsets = expand > 0 ? EdgeInsets.zero : null;DropdownMenu(expandedInsets: ...)at line 253. There is nocontrol.get...("expanded_insets")anywhere in the client.
Code example to reproduce
import flet as ft
def main(page: ft.Page):
page.add(
ft.Row(
[
ft.Dropdown(
expand=True,
expanded_insets=ft.Padding.symmetric(horizontal=40),
options=[ft.DropdownOption(key="a", text="A")],
)
]
)
)
ft.run(main)Expected behavior
With expand=True, the dropdown field is inset from its parent's edges by expanded_insets, as in Flutter's DropdownMenu.expandedInsets.
Actual behavior
The dropdown always fills its parent with zero insets (EdgeInsets.zero whenever expand is set). expanded_insets is ignored.
Suggested fix
In dropdown.dart, when expand > 0, use the parsed expanded_insets padding if it's set, otherwise EdgeInsets.zero. Or remove the property from the Python API if it isn't meant to be supported.
Flet version
1.0.1. Checked against main at 8ab92fbb.
Found while verifying Flet UI behaviour for the flet-ui-tricks agent skill.
Source: flet-dev/flet