Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
bbec650b
Unverified
Commit
bbec650b
authored
Jul 15, 2022
by
Taha Tesser
Committed by
GitHub
Jul 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`DropdownButton`: Fix hint alignment when `selectedItemBuilder` is non-null. (#106731)
parent
cf342254
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
190 additions
and
96 deletions
+190
-96
dropdown.dart
packages/flutter/lib/src/material/dropdown.dart
+5
-5
dropdown_test.dart
packages/flutter/test/material/dropdown_test.dart
+185
-91
No files found.
packages/flutter/lib/src/material/dropdown.dart
View file @
bbec650b
...
...
@@ -1397,17 +1397,17 @@ class _DropdownButtonState<T> extends State<DropdownButton<T>> with WidgetsBindi
int
?
hintIndex
;
if
(
widget
.
hint
!=
null
||
(!
_enabled
&&
widget
.
disabledHint
!=
null
))
{
Widget
displayedHint
=
_enabled
?
widget
.
hint
!
:
widget
.
disabledHint
??
widget
.
hint
!;
if
(
widget
.
selectedItemBuilder
==
null
)
{
displayedHint
=
_DropdownMenuItemContainer
(
alignment:
widget
.
alignment
,
child:
displayedHint
);
}
final
Widget
displayedHint
=
_enabled
?
widget
.
hint
!
:
widget
.
disabledHint
??
widget
.
hint
!;
hintIndex
=
items
.
length
;
items
.
add
(
DefaultTextStyle
(
style:
_textStyle
!.
copyWith
(
color:
Theme
.
of
(
context
).
hintColor
),
child:
IgnorePointer
(
ignoringSemantics:
false
,
child:
displayedHint
,
child:
_DropdownMenuItemContainer
(
alignment:
widget
.
alignment
,
child:
displayedHint
,
),
),
));
}
...
...
packages/flutter/test/material/dropdown_test.dart
View file @
bbec650b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment