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
e8f8a82a
Unverified
Commit
e8f8a82a
authored
2 years ago
by
Kate Lovett
Committed by
GitHub
2 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Fix `DropdownButton` menu clip" (#104203)
parent
24bd28f6
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
55 deletions
+21
-55
dropdown.dart
packages/flutter/lib/src/material/dropdown.dart
+21
-24
dropdown_test.dart
packages/flutter/test/material/dropdown_test.dart
+0
-31
No files found.
packages/flutter/lib/src/material/dropdown.dart
View file @
e8f8a82a
...
...
@@ -286,8 +286,6 @@ class _DropdownMenuState<T> extends State<_DropdownMenu<T>> {
namesRoute:
true
,
explicitChildNodes:
true
,
label:
localizations
.
popupMenuLabel
,
child:
ClipRRect
(
borderRadius:
widget
.
borderRadius
??
BorderRadius
.
zero
,
child:
Material
(
type:
MaterialType
.
transparency
,
textStyle:
route
.
style
,
...
...
@@ -316,7 +314,6 @@ class _DropdownMenuState<T> extends State<_DropdownMenu<T>> {
),
),
),
),
);
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/flutter/test/material/dropdown_test.dart
View file @
e8f8a82a
...
...
@@ -3839,35 +3839,4 @@ void main() {
expect
(
tester
.
getBottomRight
(
find
.
text
(
hintText
)).
dx
,
776.0
);
expect
(
tester
.
getBottomRight
(
find
.
text
(
hintText
)).
dy
,
350.0
);
});
testWidgets
(
'BorderRadius property clips dropdown menu'
,
(
WidgetTester
tester
)
async
{
const
double
radius
=
20.0
;
await
tester
.
pumpWidget
(
MaterialApp
(
home:
Scaffold
(
body:
Center
(
child:
DropdownButtonFormField
<
String
>(
borderRadius:
BorderRadius
.
circular
(
radius
),
value:
'One'
,
items:
<
String
>[
'One'
,
'Two'
,
'Three'
,
'Four'
]
.
map
<
DropdownMenuItem
<
String
>>((
String
value
)
{
return
DropdownMenuItem
<
String
>(
value:
value
,
child:
Text
(
value
),
);
}).
toList
(),
onChanged:
(
_
)
{
},
),
),
),
),
);
await
tester
.
tap
(
find
.
text
(
'One'
));
await
tester
.
pumpAndSettle
();
final
RenderClipRRect
renderClip
=
tester
.
allRenderObjects
.
whereType
<
RenderClipRRect
>().
first
;
expect
(
renderClip
.
borderRadius
,
BorderRadius
.
circular
(
radius
));
});
}
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