Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Dropdown.expanded_insets has no effect

オープン 初心者向け
#6,895 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
dart, flutter, python
領域
frontend

調査の方向性

packages/flet/lib/src/controls/dropdown.dart の expandedInsets の計算付近から始め、sdk/python/packages/flet/src/flet/controls/material/dropdown.py:181 の Python 宣言と比較してください。expand=True を指定した提供済みの例を検証し、その後、Flutter クライアントが設定済みの inset が存在する場合はそれを使用し、存在しない場合はゼロの inset を維持することを確認してください。この例では、expanded_insets が無視されないようにしてください。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
17.1k
フォーク
708
平均マージ
1日 17時間
マージ済み PR(30日)
46

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

flet-dev/flet のほかの issue

flet-dev/flet の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。