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
87fb075f
Commit
87fb075f
authored
Sep 16, 2016
by
Dragoș Tiselice
Committed by
GitHub
Sep 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed DropDown to Dropdown. (#5897)
Fixes #3208.
parent
8ac14f86
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
77 additions
and
77 deletions
+77
-77
buttons_demo.dart
examples/flutter_gallery/lib/demo/buttons_demo.dart
+4
-4
shrine_order.dart
examples/flutter_gallery/lib/demo/shrine/shrine_order.dart
+3
-3
example_code.dart
examples/flutter_gallery/lib/gallery/example_code.dart
+2
-2
data_table.dart
packages/flutter/lib/src/material/data_table.dart
+3
-3
drop_down.dart
packages/flutter/lib/src/material/drop_down.dart
+56
-56
flat_button.dart
packages/flutter/lib/src/material/flat_button.dart
+1
-1
paginated_data_table.dart
packages/flutter/lib/src/material/paginated_data_table.dart
+4
-4
raised_button.dart
packages/flutter/lib/src/material/raised_button.dart
+1
-1
drop_down_test.dart
packages/flutter/test/material/drop_down_test.dart
+3
-3
No files found.
examples/flutter_gallery/lib/demo/buttons_demo.dart
View file @
87fb075f
...
...
@@ -143,7 +143,7 @@ class _ButtonsDemoState extends State<ButtonsDemo> {
children:
<
Widget
>[
new
ListItem
(
title:
new
Text
(
'Scrollable dropdown:'
),
trailing:
new
Drop
D
ownButton
<
String
>(
trailing:
new
Drop
d
ownButton
<
String
>(
value:
dropdown1Value
,
onChanged:
(
String
newValue
)
{
setState
(()
{
...
...
@@ -156,7 +156,7 @@ class _ButtonsDemoState extends State<ButtonsDemo> {
'Bit'
,
'More'
,
'Five'
,
'Six'
,
'Seven'
,
'Eight'
,
'Nine'
,
'Ten'
]
.
map
((
String
value
)
{
return
new
Drop
D
ownMenuItem
<
String
>(
return
new
Drop
d
ownMenuItem
<
String
>(
value:
value
,
child:
new
Text
(
value
));
})
...
...
@@ -168,7 +168,7 @@ class _ButtonsDemoState extends State<ButtonsDemo> {
),
new
ListItem
(
title:
new
Text
(
'Simple dropdown:'
),
trailing:
new
Drop
D
ownButton
<
String
>(
trailing:
new
Drop
d
ownButton
<
String
>(
value:
dropdown2Value
,
onChanged:
(
String
newValue
)
{
setState
(()
{
...
...
@@ -178,7 +178,7 @@ class _ButtonsDemoState extends State<ButtonsDemo> {
},
items:
<
String
>[
'One'
,
'Two'
,
'Free'
,
'Four'
]
.
map
((
String
value
)
{
return
new
Drop
D
ownMenuItem
<
String
>(
return
new
Drop
d
ownMenuItem
<
String
>(
value:
value
,
child:
new
Text
(
value
));
})
...
...
examples/flutter_gallery/lib/demo/shrine/shrine_order.dart
View file @
87fb075f
...
...
@@ -73,16 +73,16 @@ class OrderItem extends StatelessWidget {
new
SizedBox
(
height:
16.0
),
new
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
8.0
,
bottom:
8.0
,
right:
88.0
),
child:
new
Drop
D
ownButtonHideUnderline
(
child:
new
Drop
d
ownButtonHideUnderline
(
child:
new
Container
(
decoration:
new
BoxDecoration
(
border:
new
Border
.
all
(
color:
const
Color
(
0xFFD9D9D9
)
)
),
child:
new
Drop
D
ownButton
<
int
>(
child:
new
Drop
d
ownButton
<
int
>(
items:
<
int
>[
0
,
1
,
2
,
3
,
4
,
5
].
map
((
int
value
)
{
return
new
Drop
D
ownMenuItem
<
int
>(
return
new
Drop
d
ownMenuItem
<
int
>(
value:
value
,
child:
new
Padding
(
padding:
const
EdgeInsets
.
only
(
left:
8.0
),
...
...
examples/flutter_gallery/lib/gallery/example_code.dart
View file @
87fb075f
...
...
@@ -56,7 +56,7 @@ new FlatButton(
String
dropdownValue
;
// Drop down button with string values.
new
Drop
D
ownButton
<
String
>(
new
Drop
d
ownButton
<
String
>(
value:
dropdownValue
,
onChanged:
(
String
newValue
)
{
// null indicates the user didn't select a
...
...
@@ -68,7 +68,7 @@ new DropDownButton<String>(
},
items:
<
String
>[
'One'
,
'Two'
,
'Free'
,
'Four'
]
.
map
((
String
value
)
{
return
new
Drop
D
ownMenuItem
<
String
>(
return
new
Drop
d
ownMenuItem
<
String
>(
value:
value
,
child:
new
Text
(
value
));
})
...
...
packages/flutter/lib/src/material/data_table.dart
View file @
87fb075f
...
...
@@ -153,7 +153,7 @@ class DataCell {
/// Creates an object to hold the data for a cell in a [DataTable].
///
/// The first argument is the widget to show for the cell, typically
/// a [Text] or [Drop
D
ownButton] widget; this becomes the [widget]
/// a [Text] or [Drop
d
ownButton] widget; this becomes the [widget]
/// property and must not be null.
///
/// If the cell has no data, then a [Text] widget with placeholder
...
...
@@ -170,7 +170,7 @@ class DataCell {
/// The data for the row.
///
/// Typically a [Text] widget or a [Drop
D
ownButton] widget.
/// Typically a [Text] widget or a [Drop
d
ownButton] widget.
///
/// If the cell has no data, then a [Text] widget with placeholder
/// text should be provided instead, and [placeholder] should be set
...
...
@@ -470,7 +470,7 @@ class DataTable extends StatelessWidget {
data:
new
IconThemeData
(
color:
isLightTheme
?
Colors
.
black54
:
Colors
.
white70
),
child:
new
Drop
D
ownButtonHideUnderline
(
child:
label
)
child:
new
Drop
d
ownButtonHideUnderline
(
child:
label
)
)
)
);
...
...
packages/flutter/lib/src/material/drop_down.dart
View file @
87fb075f
...
...
@@ -19,13 +19,13 @@ import 'shadows.dart';
import
'theme.dart'
;
import
'material.dart'
;
const
Duration
_kDrop
D
ownMenuDuration
=
const
Duration
(
milliseconds:
300
);
const
Duration
_kDrop
d
ownMenuDuration
=
const
Duration
(
milliseconds:
300
);
const
double
_kMenuItemHeight
=
48.0
;
const
EdgeInsets
_kMenuVerticalPadding
=
const
EdgeInsets
.
symmetric
(
vertical:
8.0
);
const
EdgeInsets
_kMenuHorizontalPadding
=
const
EdgeInsets
.
symmetric
(
horizontal:
16.0
);
class
_Drop
D
ownMenuPainter
extends
CustomPainter
{
_Drop
D
ownMenuPainter
({
class
_Drop
d
ownMenuPainter
extends
CustomPainter
{
_Drop
d
ownMenuPainter
({
Color
color
,
int
elevation
,
this
.
selectedIndex
,
...
...
@@ -68,7 +68,7 @@ class _DropDownMenuPainter extends CustomPainter {
}
@override
bool
shouldRepaint
(
_Drop
D
ownMenuPainter
oldPainter
)
{
bool
shouldRepaint
(
_Drop
d
ownMenuPainter
oldPainter
)
{
return
oldPainter
.
color
!=
color
||
oldPainter
.
elevation
!=
elevation
||
oldPainter
.
selectedIndex
!=
selectedIndex
...
...
@@ -78,8 +78,8 @@ class _DropDownMenuPainter extends CustomPainter {
// Do not use the platform-specific default scroll configuration.
// Dropdown menus should never overscroll or display an overscroll indicator.
class
_Drop
D
ownScrollConfigurationDelegate
extends
ScrollConfigurationDelegate
{
const
_Drop
D
ownScrollConfigurationDelegate
(
this
.
_platform
);
class
_Drop
d
ownScrollConfigurationDelegate
extends
ScrollConfigurationDelegate
{
const
_Drop
d
ownScrollConfigurationDelegate
(
this
.
_platform
);
@override
TargetPlatform
get
platform
=>
_platform
;
...
...
@@ -97,19 +97,19 @@ class _DropDownScrollConfigurationDelegate extends ScrollConfigurationDelegate {
bool
updateShouldNotify
(
ScrollConfigurationDelegate
old
)
=>
platform
!=
old
.
platform
;
}
class
_Drop
D
ownMenu
<
T
>
extends
StatefulWidget
{
_Drop
D
ownMenu
({
class
_Drop
d
ownMenu
<
T
>
extends
StatefulWidget
{
_Drop
d
ownMenu
({
Key
key
,
_Drop
D
ownRoute
<
T
>
route
_Drop
d
ownRoute
<
T
>
route
})
:
route
=
route
,
super
(
key:
key
);
final
_Drop
D
ownRoute
<
T
>
route
;
final
_Drop
d
ownRoute
<
T
>
route
;
@override
_Drop
DownMenuState
<
T
>
createState
()
=>
new
_DropD
ownMenuState
<
T
>();
_Drop
downMenuState
<
T
>
createState
()
=>
new
_Dropd
ownMenuState
<
T
>();
}
class
_Drop
DownMenuState
<
T
>
extends
State
<
_DropD
ownMenu
<
T
>>
{
class
_Drop
downMenuState
<
T
>
extends
State
<
_Dropd
ownMenu
<
T
>>
{
CurvedAnimation
_fadeOpacity
;
CurvedAnimation
_resize
;
...
...
@@ -142,7 +142,7 @@ class _DropDownMenuState<T> extends State<_DropDownMenu<T>> {
//
// When the menu is dismissed we just fade the entire thing out
// in the first 0.25s.
final
_Drop
D
ownRoute
<
T
>
route
=
config
.
route
;
final
_Drop
d
ownRoute
<
T
>
route
=
config
.
route
;
final
double
unit
=
0.5
/
(
route
.
items
.
length
+
1.5
);
final
List
<
Widget
>
children
=
<
Widget
>[];
for
(
int
itemIndex
=
0
;
itemIndex
<
route
.
items
.
length
;
++
itemIndex
)
{
...
...
@@ -163,7 +163,7 @@ class _DropDownMenuState<T> extends State<_DropDownMenu<T>> {
),
onTap:
()
=>
Navigator
.
pop
(
context
,
new
_Drop
D
ownRouteResult
<
T
>(
route
.
items
[
itemIndex
].
value
)
new
_Drop
d
ownRouteResult
<
T
>(
route
.
items
[
itemIndex
].
value
)
)
)
));
...
...
@@ -172,7 +172,7 @@ class _DropDownMenuState<T> extends State<_DropDownMenu<T>> {
return
new
FadeTransition
(
opacity:
_fadeOpacity
,
child:
new
CustomPaint
(
painter:
new
_Drop
D
ownMenuPainter
(
painter:
new
_Drop
d
ownMenuPainter
(
color:
Theme
.
of
(
context
).
canvasColor
,
elevation:
route
.
elevation
,
selectedIndex:
route
.
selectedIndex
,
...
...
@@ -182,7 +182,7 @@ class _DropDownMenuState<T> extends State<_DropDownMenu<T>> {
type:
MaterialType
.
transparency
,
textStyle:
route
.
style
,
child:
new
ScrollConfiguration
(
delegate:
new
_Drop
D
ownScrollConfigurationDelegate
(
Theme
.
of
(
context
).
platform
),
delegate:
new
_Drop
d
ownScrollConfigurationDelegate
(
Theme
.
of
(
context
).
platform
),
child:
new
Scrollbar
(
child:
new
ScrollableList
(
scrollableKey:
config
.
route
.
scrollableKey
,
...
...
@@ -198,10 +198,10 @@ class _DropDownMenuState<T> extends State<_DropDownMenu<T>> {
}
}
class
_Drop
D
ownMenuRouteLayout
<
T
>
extends
SingleChildLayoutDelegate
{
_Drop
D
ownMenuRouteLayout
({
this
.
route
});
class
_Drop
d
ownMenuRouteLayout
<
T
>
extends
SingleChildLayoutDelegate
{
_Drop
d
ownMenuRouteLayout
({
this
.
route
});
final
_Drop
D
ownRoute
<
T
>
route
;
final
_Drop
d
ownRoute
<
T
>
route
;
Rect
get
buttonRect
=>
route
.
buttonRect
;
int
get
selectedIndex
=>
route
.
selectedIndex
;
...
...
@@ -263,22 +263,22 @@ class _DropDownMenuRouteLayout<T> extends SingleChildLayoutDelegate {
}
@override
bool
shouldRelayout
(
_Drop
D
ownMenuRouteLayout
<
T
>
oldDelegate
)
=>
oldDelegate
.
route
!=
route
;
bool
shouldRelayout
(
_Drop
d
ownMenuRouteLayout
<
T
>
oldDelegate
)
=>
oldDelegate
.
route
!=
route
;
}
// We box the return value so that the return value can be null. Otherwise,
// canceling the route (which returns null) would get confused with actually
// returning a real null value.
class
_Drop
D
ownRouteResult
<
T
>
{
const
_Drop
D
ownRouteResult
(
this
.
result
);
class
_Drop
d
ownRouteResult
<
T
>
{
const
_Drop
d
ownRouteResult
(
this
.
result
);
final
T
result
;
@override
bool
operator
==(
dynamic
other
)
{
if
(
other
is
!
_Drop
D
ownRouteResult
<
T
>)
if
(
other
is
!
_Drop
d
ownRouteResult
<
T
>)
return
false
;
final
_Drop
D
ownRouteResult
<
T
>
typedOther
=
other
;
final
_Drop
d
ownRouteResult
<
T
>
typedOther
=
other
;
return
result
==
typedOther
.
result
;
}
...
...
@@ -286,9 +286,9 @@ class _DropDownRouteResult<T> {
int
get
hashCode
=>
result
.
hashCode
;
}
class
_Drop
DownRoute
<
T
>
extends
PopupRoute
<
_DropD
ownRouteResult
<
T
>>
{
_Drop
D
ownRoute
({
Completer
<
_Drop
D
ownRouteResult
<
T
>>
completer
,
class
_Drop
downRoute
<
T
>
extends
PopupRoute
<
_Dropd
ownRouteResult
<
T
>>
{
_Drop
d
ownRoute
({
Completer
<
_Drop
d
ownRouteResult
<
T
>>
completer
,
this
.
items
,
this
.
buttonRect
,
this
.
selectedIndex
,
...
...
@@ -298,8 +298,8 @@ class _DropDownRoute<T> extends PopupRoute<_DropDownRouteResult<T>> {
assert
(
style
!=
null
);
}
final
GlobalKey
<
ScrollableState
>
scrollableKey
=
new
GlobalKey
<
ScrollableState
>(
debugLabel:
'_Drop
D
ownMenu'
);
final
List
<
Drop
D
ownMenuItem
<
T
>>
items
;
final
GlobalKey
<
ScrollableState
>
scrollableKey
=
new
GlobalKey
<
ScrollableState
>(
debugLabel:
'_Drop
d
ownMenu'
);
final
List
<
Drop
d
ownMenuItem
<
T
>>
items
;
final
Rect
buttonRect
;
final
int
selectedIndex
;
final
int
elevation
;
...
...
@@ -319,7 +319,7 @@ class _DropDownRoute<T> extends PopupRoute<_DropDownRouteResult<T>> {
}
@override
Duration
get
transitionDuration
=>
_kDrop
D
ownMenuDuration
;
Duration
get
transitionDuration
=>
_kDrop
d
ownMenuDuration
;
@override
bool
get
barrierDismissable
=>
true
;
...
...
@@ -330,21 +330,21 @@ class _DropDownRoute<T> extends PopupRoute<_DropDownRouteResult<T>> {
@override
Widget
buildPage
(
BuildContext
context
,
Animation
<
double
>
animation
,
Animation
<
double
>
forwardAnimation
)
{
return
new
CustomSingleChildLayout
(
delegate:
new
_Drop
D
ownMenuRouteLayout
<
T
>(
route:
this
),
child:
new
_Drop
D
ownMenu
<
T
>(
route:
this
)
delegate:
new
_Drop
d
ownMenuRouteLayout
<
T
>(
route:
this
),
child:
new
_Drop
d
ownMenu
<
T
>(
route:
this
)
);
}
}
/// An item in a menu created by a [Drop
D
ownButton].
/// An item in a menu created by a [Drop
d
ownButton].
///
/// The type `T` is the type of the value the entry represents. All the entries
/// in a given menu must represent values with consistent types.
class
Drop
D
ownMenuItem
<
T
>
extends
StatelessWidget
{
class
Drop
d
ownMenuItem
<
T
>
extends
StatelessWidget
{
/// Creates an item for a drop down menu.
///
/// The [child] argument is required.
Drop
D
ownMenuItem
({
Drop
d
ownMenuItem
({
Key
key
,
this
.
value
,
this
.
child
...
...
@@ -359,7 +359,7 @@ class DropDownMenuItem<T> extends StatelessWidget {
/// The value to return if the user selects this menu item.
///
/// Eventually returned in a call to [Drop
D
ownButton.onChanged].
/// Eventually returned in a call to [Drop
d
ownButton.onChanged].
final
T
value
;
@override
...
...
@@ -372,30 +372,30 @@ class DropDownMenuItem<T> extends StatelessWidget {
}
}
/// An inherited widget that causes any descendant [Drop
D
ownButton]
/// An inherited widget that causes any descendant [Drop
d
ownButton]
/// widgets to not include their regular underline.
///
/// This is used by [DataTable] to remove the underline from any
/// [Drop
D
ownButton] widgets placed within material data tables, as
/// [Drop
d
ownButton] widgets placed within material data tables, as
/// required by the material design specification.
class
Drop
D
ownButtonHideUnderline
extends
InheritedWidget
{
/// Creates a [Drop
D
ownButtonHideUnderline]. A non-null [child] must
class
Drop
d
ownButtonHideUnderline
extends
InheritedWidget
{
/// Creates a [Drop
d
ownButtonHideUnderline]. A non-null [child] must
/// be given.
Drop
D
ownButtonHideUnderline
({
Drop
d
ownButtonHideUnderline
({
Key
key
,
Widget
child
})
:
super
(
key:
key
,
child:
child
)
{
assert
(
child
!=
null
);
}
/// Returns whether the underline of [Drop
D
ownButton] widgets should
/// Returns whether the underline of [Drop
d
ownButton] widgets should
/// be hidden.
static
bool
at
(
BuildContext
context
)
{
return
context
.
inheritFromWidgetOfExactType
(
Drop
D
ownButtonHideUnderline
)
!=
null
;
return
context
.
inheritFromWidgetOfExactType
(
Drop
d
ownButtonHideUnderline
)
!=
null
;
}
@override
bool
updateShouldNotify
(
Drop
D
ownButtonHideUnderline
old
)
=>
false
;
bool
updateShouldNotify
(
Drop
d
ownButtonHideUnderline
old
)
=>
false
;
}
/// A material design button for selecting from a list of items.
...
...
@@ -411,14 +411,14 @@ class DropDownButtonHideUnderline extends InheritedWidget {
/// * [RaisedButton]
/// * [FlatButton]
/// * <https://www.google.com/design/spec/components/buttons.html#buttons-dropdown-buttons>
class
Drop
D
ownButton
<
T
>
extends
StatefulWidget
{
class
Drop
d
ownButton
<
T
>
extends
StatefulWidget
{
/// Creates a drop down button.
///
/// The [items] must have distinct values and [value] must be among them.
///
/// The [elevation] and [iconSize] arguments must not be null (they both have
/// defaults, so do not need to be specified).
Drop
D
ownButton
({
Drop
d
ownButton
({
Key
key
,
@required
this
.
items
,
@required
this
.
value
,
...
...
@@ -428,11 +428,11 @@ class DropDownButton<T> extends StatefulWidget {
this
.
iconSize
:
24.0
})
:
super
(
key:
key
)
{
assert
(
items
!=
null
);
assert
(
items
.
where
((
Drop
D
ownMenuItem
<
T
>
item
)
=>
item
.
value
==
value
).
length
==
1
);
assert
(
items
.
where
((
Drop
d
ownMenuItem
<
T
>
item
)
=>
item
.
value
==
value
).
length
==
1
);
}
/// The list of possible items to select among.
final
List
<
Drop
D
ownMenuItem
<
T
>>
items
;
final
List
<
Drop
d
ownMenuItem
<
T
>>
items
;
/// The currently selected item.
final
T
value
;
...
...
@@ -458,10 +458,10 @@ class DropDownButton<T> extends StatefulWidget {
final
double
iconSize
;
@override
_Drop
DownButtonState
<
T
>
createState
()
=>
new
_DropD
ownButtonState
<
T
>();
_Drop
downButtonState
<
T
>
createState
()
=>
new
_Dropd
ownButtonState
<
T
>();
}
class
_Drop
DownButtonState
<
T
>
extends
State
<
DropD
ownButton
<
T
>>
{
class
_Drop
downButtonState
<
T
>
extends
State
<
Dropd
ownButton
<
T
>>
{
@override
void
initState
()
{
super
.
initState
();
...
...
@@ -470,7 +470,7 @@ class _DropDownButtonState<T> extends State<DropDownButton<T>> {
}
@override
void
didUpdateConfig
(
Drop
D
ownButton
<
T
>
oldConfig
)
{
void
didUpdateConfig
(
Drop
d
ownButton
<
T
>
oldConfig
)
{
if
(
config
.
items
[
_selectedIndex
].
value
!=
config
.
value
)
_updateSelectedIndex
();
}
...
...
@@ -488,14 +488,14 @@ class _DropDownButtonState<T> extends State<DropDownButton<T>> {
TextStyle
get
_textStyle
=>
config
.
style
??
Theme
.
of
(
context
).
textTheme
.
subhead
;
_Drop
D
ownRoute
<
T
>
_currentRoute
;
_Drop
d
ownRoute
<
T
>
_currentRoute
;
void
_handleTap
()
{
assert
(
_currentRoute
==
null
);
final
RenderBox
itemBox
=
context
.
findRenderObject
();
final
Rect
itemRect
=
itemBox
.
localToGlobal
(
Point
.
origin
)
&
itemBox
.
size
;
final
Completer
<
_Drop
DownRouteResult
<
T
>>
completer
=
new
Completer
<
_DropD
ownRouteResult
<
T
>>();
_currentRoute
=
new
_Drop
D
ownRoute
<
T
>(
final
Completer
<
_Drop
downRouteResult
<
T
>>
completer
=
new
Completer
<
_Dropd
ownRouteResult
<
T
>>();
_currentRoute
=
new
_Drop
d
ownRoute
<
T
>(
completer:
completer
,
items:
config
.
items
,
buttonRect:
_kMenuHorizontalPadding
.
inflateRect
(
itemRect
),
...
...
@@ -504,7 +504,7 @@ class _DropDownButtonState<T> extends State<DropDownButton<T>> {
style:
_textStyle
);
Navigator
.
push
(
context
,
_currentRoute
);
completer
.
future
.
then
((
_Drop
D
ownRouteResult
<
T
>
newValue
)
{
completer
.
future
.
then
((
_Drop
d
ownRouteResult
<
T
>
newValue
)
{
_currentRoute
=
null
;
if
(!
mounted
||
newValue
==
null
)
return
;
...
...
@@ -540,7 +540,7 @@ class _DropDownButtonState<T> extends State<DropDownButton<T>> {
)
);
if
(!
Drop
D
ownButtonHideUnderline
.
at
(
context
))
{
if
(!
Drop
d
ownButtonHideUnderline
.
at
(
context
))
{
result
=
new
Stack
(
children:
<
Widget
>[
result
,
...
...
packages/flutter/lib/src/material/flat_button.dart
View file @
87fb075f
...
...
@@ -32,7 +32,7 @@ import 'theme.dart';
/// See also:
///
/// * [RaisedButton]
/// * [Drop
D
ownButton]
/// * [Drop
d
ownButton]
/// * <https://www.google.com/design/spec/components/buttons.html>
class
FlatButton
extends
StatelessWidget
{
/// Creates a flat button.
...
...
packages/flutter/lib/src/material/paginated_data_table.dart
View file @
87fb075f
...
...
@@ -307,8 +307,8 @@ class PaginatedDataTableState extends State<PaginatedDataTable> {
if
(
config
.
onRowsPerPageChanged
!=
null
)
{
List
<
Widget
>
availableRowsPerPage
=
config
.
availableRowsPerPage
.
where
((
int
value
)
=>
value
<=
_rowCount
)
.
map
/*<Drop
D
ownMenuItem<int>>*/
((
int
value
)
{
return
new
Drop
D
ownMenuItem
<
int
>(
.
map
/*<Drop
d
ownMenuItem<int>>*/
((
int
value
)
{
return
new
Drop
d
ownMenuItem
<
int
>(
value:
value
,
child:
new
Text
(
'
$value
'
)
);
...
...
@@ -316,8 +316,8 @@ class PaginatedDataTableState extends State<PaginatedDataTable> {
.
toList
();
footerWidgets
.
addAll
(<
Widget
>[
new
Text
(
'Rows per page:'
),
new
Drop
D
ownButtonHideUnderline
(
child:
new
Drop
D
ownButton
<
int
>(
new
Drop
d
ownButtonHideUnderline
(
child:
new
Drop
d
ownButton
<
int
>(
items:
availableRowsPerPage
,
value:
config
.
rowsPerPage
,
onChanged:
config
.
onRowsPerPageChanged
,
...
...
packages/flutter/lib/src/material/raised_button.dart
View file @
87fb075f
...
...
@@ -29,7 +29,7 @@ import 'theme.dart';
/// See also:
///
/// * [FlatButton]
/// * [Drop
D
ownButton]
/// * [Drop
d
ownButton]
/// * [FloatingActionButton]
/// * <https://www.google.com/design/spec/components/buttons.html>
class
RaisedButton
extends
StatelessWidget
{
...
...
packages/flutter/test/material/drop_down_test.dart
View file @
87fb075f
...
...
@@ -8,15 +8,15 @@ import 'package:flutter/material.dart';
void
main
(
)
{
testWidgets
(
'Drop down screen edges'
,
(
WidgetTester
tester
)
async
{
int
value
=
4
;
List
<
Drop
DownMenuItem
<
int
>>
items
=
<
DropD
ownMenuItem
<
int
>>[];
List
<
Drop
downMenuItem
<
int
>>
items
=
<
Dropd
ownMenuItem
<
int
>>[];
for
(
int
i
=
0
;
i
<
20
;
++
i
)
items
.
add
(
new
Drop
D
ownMenuItem
<
int
>(
value:
i
,
child:
new
Text
(
'
$i
'
)));
items
.
add
(
new
Drop
d
ownMenuItem
<
int
>(
value:
i
,
child:
new
Text
(
'
$i
'
)));
void
handleChanged
(
int
newValue
)
{
value
=
newValue
;
}
Drop
DownButton
<
int
>
button
=
new
DropD
ownButton
<
int
>(
Drop
downButton
<
int
>
button
=
new
Dropd
ownButton
<
int
>(
value:
value
,
onChanged:
handleChanged
,
items:
items
...
...
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