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
13a72114
Unverified
Commit
13a72114
authored
May 12, 2021
by
Abhishek Ghaskata
Committed by
GitHub
May 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chagne the elevation from int to double (#82340)
parent
1ff5665f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
12 deletions
+8
-12
dropdown.dart
packages/flutter/lib/src/material/dropdown.dart
+5
-9
dropdown_form_field_test.dart
packages/flutter/test/material/dropdown_form_field_test.dart
+2
-2
dropdown_test.dart
packages/flutter/test/material/dropdown_test.dart
+1
-1
No files found.
packages/flutter/lib/src/material/dropdown.dart
View file @
13a72114
...
@@ -55,7 +55,7 @@ class _DropdownMenuPainter extends CustomPainter {
...
@@ -55,7 +55,7 @@ class _DropdownMenuPainter extends CustomPainter {
super
(
repaint:
resize
);
super
(
repaint:
resize
);
final
Color
?
color
;
final
Color
?
color
;
final
int
?
elevation
;
final
double
?
elevation
;
final
int
?
selectedIndex
;
final
int
?
selectedIndex
;
final
Animation
<
double
>
resize
;
final
Animation
<
double
>
resize
;
final
ValueGetter
<
double
>
getSelectedItemOffset
;
final
ValueGetter
<
double
>
getSelectedItemOffset
;
...
@@ -425,7 +425,7 @@ class _DropdownRoute<T> extends PopupRoute<_DropdownRouteResult<T>> {
...
@@ -425,7 +425,7 @@ class _DropdownRoute<T> extends PopupRoute<_DropdownRouteResult<T>> {
final
EdgeInsetsGeometry
padding
;
final
EdgeInsetsGeometry
padding
;
final
Rect
buttonRect
;
final
Rect
buttonRect
;
final
int
selectedIndex
;
final
int
selectedIndex
;
final
int
elevation
;
final
double
elevation
;
final
CapturedThemes
capturedThemes
;
final
CapturedThemes
capturedThemes
;
final
TextStyle
style
;
final
TextStyle
style
;
final
double
?
itemHeight
;
final
double
?
itemHeight
;
...
@@ -568,7 +568,7 @@ class _DropdownRoutePage<T> extends StatelessWidget {
...
@@ -568,7 +568,7 @@ class _DropdownRoutePage<T> extends StatelessWidget {
final
EdgeInsetsGeometry
padding
;
final
EdgeInsetsGeometry
padding
;
final
Rect
buttonRect
;
final
Rect
buttonRect
;
final
int
selectedIndex
;
final
int
selectedIndex
;
final
int
elevation
;
final
double
elevation
;
final
CapturedThemes
capturedThemes
;
final
CapturedThemes
capturedThemes
;
final
TextStyle
?
style
;
final
TextStyle
?
style
;
final
Color
?
dropdownColor
;
final
Color
?
dropdownColor
;
...
@@ -997,12 +997,8 @@ class DropdownButton<T> extends StatefulWidget {
...
@@ -997,12 +997,8 @@ class DropdownButton<T> extends StatefulWidget {
final
DropdownButtonBuilder
?
selectedItemBuilder
;
final
DropdownButtonBuilder
?
selectedItemBuilder
;
/// The z-coordinate at which to place the menu when open.
/// The z-coordinate at which to place the menu when open.
///
/// The following elevations have defined shadows: 1, 2, 3, 4, 6, 8, 9, 12,
/// 16, and 24. See [kElevationToShadow].
///
/// Defaults to 8, the appropriate elevation for dropdown buttons.
/// Defaults to 8, the appropriate elevation for dropdown buttons.
final
int
elevation
;
final
double
elevation
;
/// The text style to use for text in the dropdown button and the dropdown
/// The text style to use for text in the dropdown button and the dropdown
/// menu that appears when you tap the button.
/// menu that appears when you tap the button.
...
@@ -1540,7 +1536,7 @@ class DropdownButtonFormField<T> extends FormField<T> {
...
@@ -1540,7 +1536,7 @@ class DropdownButtonFormField<T> extends FormField<T> {
Widget
?
disabledHint
,
Widget
?
disabledHint
,
this
.
onChanged
,
this
.
onChanged
,
VoidCallback
?
onTap
,
VoidCallback
?
onTap
,
int
elevation
=
8
,
double
elevation
=
8
,
TextStyle
?
style
,
TextStyle
?
style
,
Widget
?
icon
,
Widget
?
icon
,
Color
?
iconDisabledColor
,
Color
?
iconDisabledColor
,
...
...
packages/flutter/test/material/dropdown_form_field_test.dart
View file @
13a72114
...
@@ -27,7 +27,7 @@ Finder _iconRichText(Key iconKey) {
...
@@ -27,7 +27,7 @@ Finder _iconRichText(Key iconKey) {
Widget
buildFormFrame
(
{
Widget
buildFormFrame
(
{
Key
?
buttonKey
,
Key
?
buttonKey
,
AutovalidateMode
autovalidateMode
=
AutovalidateMode
.
disabled
,
AutovalidateMode
autovalidateMode
=
AutovalidateMode
.
disabled
,
int
elevation
=
8
,
double
elevation
=
8
,
String
?
value
=
'two'
,
String
?
value
=
'two'
,
ValueChanged
<
String
?>?
onChanged
,
ValueChanged
<
String
?>?
onChanged
,
VoidCallback
?
onTap
,
VoidCallback
?
onTap
,
...
@@ -125,7 +125,7 @@ class TestApp extends StatefulWidget {
...
@@ -125,7 +125,7 @@ class TestApp extends StatefulWidget {
State
<
TestApp
>
createState
()
=>
_TestAppState
();
State
<
TestApp
>
createState
()
=>
_TestAppState
();
}
}
void
verifyPaintedShadow
(
Finder
customPaint
,
int
elevation
)
{
void
verifyPaintedShadow
(
Finder
customPaint
,
double
elevation
)
{
const
Rect
originalRectangle
=
Rect
.
fromLTRB
(
0.0
,
0.0
,
800
,
208.0
);
const
Rect
originalRectangle
=
Rect
.
fromLTRB
(
0.0
,
0.0
,
800
,
208.0
);
final
List
<
BoxShadow
>
boxShadows
=
List
<
BoxShadow
>.
generate
(
3
,
(
int
index
)
=>
kElevationToShadow
[
elevation
]![
index
]);
final
List
<
BoxShadow
>
boxShadows
=
List
<
BoxShadow
>.
generate
(
3
,
(
int
index
)
=>
kElevationToShadow
[
elevation
]![
index
]);
...
...
packages/flutter/test/material/dropdown_test.dart
View file @
13a72114
...
@@ -237,7 +237,7 @@ void checkSelectedItemTextGeometry(WidgetTester tester, String value) {
...
@@ -237,7 +237,7 @@ void checkSelectedItemTextGeometry(WidgetTester tester, String value) {
expect
(
box0
.
size
,
equals
(
box1
.
size
));
expect
(
box0
.
size
,
equals
(
box1
.
size
));
}
}
void
verifyPaintedShadow
(
Finder
customPaint
,
int
elevation
)
{
void
verifyPaintedShadow
(
Finder
customPaint
,
double
elevation
)
{
const
Rect
originalRectangle
=
Rect
.
fromLTRB
(
0.0
,
0.0
,
800
,
208.0
);
const
Rect
originalRectangle
=
Rect
.
fromLTRB
(
0.0
,
0.0
,
800
,
208.0
);
final
List
<
BoxShadow
>
boxShadows
=
List
<
BoxShadow
>.
generate
(
3
,
(
int
index
)
=>
kElevationToShadow
[
elevation
]![
index
]);
final
List
<
BoxShadow
>
boxShadows
=
List
<
BoxShadow
>.
generate
(
3
,
(
int
index
)
=>
kElevationToShadow
[
elevation
]![
index
]);
...
...
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