Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Dropdown.expanded_insets has no effect

Abierto Apto para principiantes
#6,895 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
88/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
dart, flutter, python
Área
frontend

Línea de trabajo

Comienza en packages/flet/lib/src/controls/dropdown.dart, alrededor del cálculo de expandedInsets, y compáralo con la declaración de Python en sdk/python/packages/flet/src/flet/controls/material/dropdown.py:181. Verifica el ejemplo proporcionado con expand=True y, después, confirma que el cliente de Flutter usa los insets configurados cuando están presentes y conserva los insets con valor cero cuando no lo están; el ejemplo ya no debería ignorar expanded_insets.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug controls
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"), in sdk/python/packages/flet/src/flet/controls/material/dropdown.py:181
  • Dart: packages/flet/lib/src/controls/dropdown.dart:229 derives expandedInsets only from expand:
    EdgeInsets? expandedInsets = expand > 0 ? EdgeInsets.zero : null;
    
    It then passes that value to DropdownMenu(expandedInsets: ...) at line 253. There is no control.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.

Lenguaje dominante
Python
Estrellas
17.1k
Forks
708
Merge medio
1 d 17 h
PR fusionados (30 d)
46

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de flet-dev/flet

Todos los issues de flet-dev/flet

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.