Skip to content

Commit 6e12675

Browse files
authored
Merge pull request #362 from AhmedLSayed9/fix_dropdown_formfield_padding_when_aligned
Fix DropdownButtonFormField padding when ButtonTheme.alignedDropdown …
2 parents 57a994b + 7b0e3df commit 6e12675

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/dropdown_button2/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- Use decoration hint text as the default value for dropdown button hints [Flutter core].
1414
- Update SDK constraints: ">=3.4.0 <4.0.0"
1515
- Fix DropdownButtonFormField clips text when large text scale is used [Flutter core].
16+
- Fix DropdownButtonFormField padding when ButtonTheme.alignedDropdown is true [Flutter core].
1617

1718
## 3.0.0-beta.21
1819

packages/dropdown_button2/lib/src/dropdown_button2.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,9 @@ class _DropdownButton2State<T> extends State<DropdownButton2<T>> with WidgetsBin
725725
}
726726

727727
final EdgeInsetsGeometry padding =
728-
ButtonTheme.of(context).alignedDropdown ? _kAlignedButtonPadding : _kUnalignedButtonPadding;
728+
ButtonTheme.of(context).alignedDropdown && widget._inputDecoration == null
729+
? _kAlignedButtonPadding
730+
: _kUnalignedButtonPadding;
729731

730732
final buttonHeight = _buttonStyle?.height ?? (widget.isDense ? _denseButtonHeight : null);
731733

0 commit comments

Comments
 (0)