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
156645b4
Commit
156645b4
authored
Nov 04, 2015
by
Hans Muller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Widen the dropdown menu item InkWells
parent
ff8e4061
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
dropdown.dart
packages/flutter/lib/src/material/dropdown.dart
+8
-5
box_painter.dart
packages/flutter/lib/src/painting/box_painter.dart
+4
-0
No files found.
packages/flutter/lib/src/material/dropdown.dart
View file @
156645b4
...
...
@@ -17,7 +17,7 @@ import 'theme.dart';
const
Duration
_kMenuDuration
=
const
Duration
(
milliseconds:
300
);
const
double
_kMenuItemHeight
=
48.0
;
const
double
_kMenuHorizontalPadding
=
36.0
;
const
EdgeDims
_kMenuHorizontalPadding
=
const
EdgeDims
.
only
(
left:
36.0
,
right:
36.0
)
;
const
double
_kBaselineOffsetFromBottom
=
20.0
;
const
Border
_kDropdownUnderline
=
const
Border
(
bottom:
const
BorderSide
(
color:
const
Color
(
0xFFBDBDBD
),
width:
2.0
));
...
...
@@ -54,7 +54,10 @@ class _DropdownMenu extends StatusTransitionComponent {
performance:
route
.
performance
,
opacity:
opacity
,
child:
new
InkWell
(
child:
route
.
items
[
itemIndex
],
child:
new
Container
(
padding:
_kMenuHorizontalPadding
,
child:
route
.
items
[
itemIndex
]
),
onTap:
()
{
Navigator
.
of
(
context
).
pop
(
route
.
items
[
itemIndex
].
value
);
}
...
...
@@ -91,8 +94,8 @@ class _DropdownMenu extends StatusTransitionComponent {
return
new
Positioned
(
top:
menuRect
.
top
-
(
route
.
selectedIndex
*
route
.
rect
.
height
),
right:
menuRect
.
right
-
_kMenuHorizontalPadding
,
left:
menuRect
.
left
-
_kMenuHorizontalPadding
,
right:
menuRect
.
right
,
left:
menuRect
.
left
,
child:
new
Focus
(
key:
new
GlobalObjectKey
(
route
),
child:
new
FadeTransition
(
...
...
@@ -196,7 +199,7 @@ class DropdownButton<T> extends StatelessComponent {
completer:
completer
,
items:
items
,
selectedIndex:
selectedIndex
,
rect:
rect
,
rect:
_kMenuHorizontalPadding
.
inflateRect
(
rect
)
,
level:
level
));
completer
.
future
.
then
((
T
newValue
)
{
...
...
packages/flutter/lib/src/painting/box_painter.dart
View file @
156645b4
...
...
@@ -51,6 +51,10 @@ class EdgeDims {
/// The size that this edge dims would occupy with an empty interior.
Size
get
collapsedSize
=>
new
Size
(
left
+
right
,
top
+
bottom
);
Rect
inflateRect
(
Rect
rect
)
{
return
new
Rect
.
fromLTRB
(
rect
.
left
-
left
,
rect
.
top
-
top
,
rect
.
right
+
right
,
rect
.
bottom
+
bottom
);
}
EdgeDims
operator
-(
EdgeDims
other
)
{
return
new
EdgeDims
.
TRBL
(
top
-
other
.
top
,
...
...
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