File tree Expand file tree Collapse file tree 4 files changed +5
-3
lines changed
dropdown_button2_test/test/examples
goldens/form_field_example Expand file tree Collapse file tree 4 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1919- Respect inputDecoration's borderRadius when barrierCoversButton is false.
2020- Support BorderRadiusDirectional for dropdown menu.
2121- Fix barrier when using TextDirection.rtl while barrierCoversButton set to false.
22+ - Take InputDecoration's densityOffset into account when determining the button size.
2223
2324## 3.0.0-beta.21
2425
Original file line number Diff line number Diff line change @@ -570,8 +570,11 @@ class _DropdownButton2State<T> extends State<DropdownButton2<T>> with WidgetsBin
570570 // Return the contentPadding only if inputDecoration is defined.
571571 if (widget._inputDecoration case final decoration? ) {
572572 final TextDirection ? textDirection = Directionality .maybeOf (context);
573+ // Use inputDecorationTheme.visualDensity when added (https://github.com/flutter/flutter/issues/166201#issuecomment-2774622584)
574+ final Offset densityOffset = Theme .of (context).visualDensity.baseSizeAdjustment;
573575 return (decoration.contentPadding ?? Theme .of (context).inputDecorationTheme.contentPadding)
574- ? .resolve (textDirection);
576+ ? .add (EdgeInsets .symmetric (vertical: densityOffset.dy / 2 ))
577+ .resolve (textDirection);
575578 } else {
576579 return null ;
577580 }
Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ import 'test_app.dart';
88void main () {
99 runGoldenTests (
1010 'FormField Example' ,
11- // NOTE: InputDecorator's contentPadding.vertical is incorrect on desktop
12- // until https://github.com/flutter/flutter/issues/166201 is fixed
1311 (WidgetTester tester, ViewVariant variant) async {
1412 // GIVEN
1513 await tester.pumpTestApp (const FormFieldExample ());
You can’t perform that action at this time.
0 commit comments