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
41338c35
Commit
41338c35
authored
Apr 06, 2016
by
Ian Hickson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Material design rules for capitalisation
See
https://www.google.com/design/spec/style/writing.html#
parent
2d49e807
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
71 additions
and
71 deletions
+71
-71
buttons_demo.dart
examples/material_gallery/lib/demo/buttons_demo.dart
+1
-1
cards_demo.dart
examples/material_gallery/lib/demo/cards_demo.dart
+1
-1
chip_demo.dart
examples/material_gallery/lib/demo/chip_demo.dart
+1
-1
colors_demo.dart
examples/material_gallery/lib/demo/colors_demo.dart
+1
-1
date_picker_demo.dart
examples/material_gallery/lib/demo/date_picker_demo.dart
+1
-1
dialog_demo.dart
examples/material_gallery/lib/demo/dialog_demo.dart
+1
-1
drawing_demo.dart
examples/material_gallery/lib/demo/drawing_demo.dart
+1
-1
drop_down_demo.dart
examples/material_gallery/lib/demo/drop_down_demo.dart
+1
-1
fitness_demo.dart
examples/material_gallery/lib/demo/fitness_demo.dart
+5
-5
flexible_space_demo.dart
examples/material_gallery/lib/demo/flexible_space_demo.dart
+2
-2
full_screen_dialog_demo.dart
...es/material_gallery/lib/demo/full_screen_dialog_demo.dart
+1
-1
grid_list_demo.dart
examples/material_gallery/lib/demo/grid_list_demo.dart
+1
-1
leave_behind_demo.dart
examples/material_gallery/lib/demo/leave_behind_demo.dart
+1
-1
list_demo.dart
examples/material_gallery/lib/demo/list_demo.dart
+6
-6
menu_demo.dart
examples/material_gallery/lib/demo/menu_demo.dart
+5
-5
modal_bottom_sheet_demo.dart
...es/material_gallery/lib/demo/modal_bottom_sheet_demo.dart
+2
-2
page_selector_demo.dart
examples/material_gallery/lib/demo/page_selector_demo.dart
+1
-1
persistent_bottom_sheet_demo.dart
...terial_gallery/lib/demo/persistent_bottom_sheet_demo.dart
+2
-2
progress_indicator_demo.dart
...es/material_gallery/lib/demo/progress_indicator_demo.dart
+2
-2
scrollable_tabs_demo.dart
examples/material_gallery/lib/demo/scrollable_tabs_demo.dart
+4
-4
scrolling_techniques_demo.dart
.../material_gallery/lib/demo/scrolling_techniques_demo.dart
+1
-1
selection_controls_demo.dart
...es/material_gallery/lib/demo/selection_controls_demo.dart
+1
-1
snack_bar_demo.dart
examples/material_gallery/lib/demo/snack_bar_demo.dart
+3
-3
tabs_demo.dart
examples/material_gallery/lib/demo/tabs_demo.dart
+1
-1
tabs_fab_demo.dart
examples/material_gallery/lib/demo/tabs_fab_demo.dart
+1
-1
text_field_demo.dart
examples/material_gallery/lib/demo/text_field_demo.dart
+1
-1
time_picker_demo.dart
examples/material_gallery/lib/demo/time_picker_demo.dart
+1
-1
tooltip_demo.dart
examples/material_gallery/lib/demo/tooltip_demo.dart
+2
-2
two_level_list_demo.dart
examples/material_gallery/lib/demo/two_level_list_demo.dart
+1
-1
weather_demo.dart
examples/material_gallery/lib/demo/weather_demo.dart
+2
-2
home.dart
examples/material_gallery/lib/gallery/home.dart
+17
-17
No files found.
examples/material_gallery/lib/demo/buttons_demo.dart
View file @
41338c35
...
...
@@ -201,7 +201,7 @@ class _ButtonsDemoState extends State<ButtonsDemo> {
values:
_demos
,
child:
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
"Buttons"
),
title:
new
Text
(
'Buttons'
),
tabBar:
new
TabBar
<
_ButtonDemo
>(
isScrollable:
true
,
labels:
new
Map
<
_ButtonDemo
,
TabLabel
>.
fromIterable
(
_demos
,
value:
(
_ButtonDemo
demo
)
=>
demo
.
tabLabel
)
...
...
examples/material_gallery/lib/demo/cards_demo.dart
View file @
41338c35
...
...
@@ -120,7 +120,7 @@ class CardsDemo extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
"Travel Stream"
)
title:
new
Text
(
'Travel stream'
)
),
body:
new
Block
(
padding:
const
EdgeInsets
.
only
(
top:
8.0
,
left:
8.0
,
right:
8.0
),
...
...
examples/material_gallery/lib/demo/chip_demo.dart
View file @
41338c35
...
...
@@ -38,7 +38,7 @@ class _ChipDemoState extends State<ChipDemo> {
}
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
"Chips"
)),
appBar:
new
AppBar
(
title:
new
Text
(
'Chips'
)),
body:
new
Block
(
children:
chips
.
map
((
Widget
widget
)
{
return
new
Container
(
...
...
examples/material_gallery/lib/demo/colors_demo.dart
View file @
41338c35
...
...
@@ -116,7 +116,7 @@ class ColorsDemo extends StatelessWidget {
child:
new
Scaffold
(
appBar:
new
AppBar
(
elevation:
0
,
title:
new
Text
(
"Colors"
),
title:
new
Text
(
'Colors'
),
tabBar:
new
TabBar
<
ColorSwatch
>(
isScrollable:
true
,
labels:
new
Map
<
ColorSwatch
,
TabLabel
>.
fromIterable
(
colorSwatches
,
value:
(
ColorSwatch
swatch
)
{
...
...
examples/material_gallery/lib/demo/date_picker_demo.dart
View file @
41338c35
...
...
@@ -33,7 +33,7 @@ class _DatePickerDemoState extends State<DatePickerDemo> {
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
"Date Picker"
)),
appBar:
new
AppBar
(
title:
new
Text
(
'Date picker'
)),
body:
new
Column
(
children:
<
Widget
>[
new
Text
(
new
DateFormat
.
yMMMd
().
format
(
_selectedDate
)),
...
...
examples/material_gallery/lib/demo/dialog_demo.dart
View file @
41338c35
...
...
@@ -119,7 +119,7 @@ class DialogDemoState extends State<DialogDemo> {
showDemoDialog
/*<DialogDemoAction>*/
(
context:
context
,
dialog:
new
Dialog
(
title:
new
Text
(
"Use Google's location service?"
),
title:
new
Text
(
'Use Google
\'
s location service?'
),
content:
new
Text
(
_alertWithTitleText
,
style:
dialogTextStyle
...
...
examples/material_gallery/lib/demo/drawing_demo.dart
View file @
41338c35
...
...
@@ -48,7 +48,7 @@ class _DrawingDemoState extends State<DrawingDemo> {
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
"Fancy Lines"
)
title:
new
Text
(
'Fancy lines'
)
),
body:
body
);
...
...
examples/material_gallery/lib/demo/drop_down_demo.dart
View file @
41338c35
...
...
@@ -22,7 +22,7 @@ class _DropDownDemoState extends State<DropDownDemo> {
@override
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
"Dropdown Button"
)),
appBar:
new
AppBar
(
title:
new
Text
(
'Drop-down button'
)),
body:
new
Center
(
child:
new
DropDownButton
<
String
>(
items:
buildItems
(),
...
...
examples/material_gallery/lib/demo/fitness_demo.dart
View file @
41338c35
...
...
@@ -20,7 +20,7 @@ class FitnessDemo extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
"Fitness"
)
title:
new
Text
(
'Fitness'
)
),
body:
new
_FitnessDemoContents
()
);
...
...
@@ -108,7 +108,7 @@ class _FitnessDemoContentsState extends State<_FitnessDemoContents> {
),
new
Padding
(
padding:
new
EdgeInsets
.
only
(
top:
20.0
),
child:
new
Text
(
"JUMPING JACKS"
,
style:
Theme
.
of
(
context
).
textTheme
.
title
)
child:
new
Text
(
'JUMPING JACKS'
,
style:
Theme
.
of
(
context
).
textTheme
.
title
)
),
new
Padding
(
padding:
new
EdgeInsets
.
only
(
top:
20.0
,
bottom:
20.0
),
...
...
@@ -186,11 +186,11 @@ class _FitnessDemoContentsState extends State<_FitnessDemoContents> {
child:
new
Stack
(
children:
<
Widget
>[
new
_Fireworks
(),
new
Dialog
(
title:
new
Text
(
"Awesome workout"
),
content:
new
Text
(
"You have completed
$_count
jumping jacks. Good going!"
),
title:
new
Text
(
'Awesome workout'
),
content:
new
Text
(
'You have completed
$_count
jumping jacks. Good going!'
),
actions:
<
Widget
>[
new
FlatButton
(
child:
new
Text
(
"SWEET"
),
child:
new
Text
(
'SWEET'
),
onPressed:
()
{
Navigator
.
pop
(
context
);
}
)
]
...
...
examples/material_gallery/lib/demo/flexible_space_demo.dart
View file @
41338c35
...
...
@@ -113,11 +113,11 @@ class FlexibleSpaceDemoState extends State<FlexibleSpaceDemo> {
itemBuilder:
(
BuildContext
context
)
=>
<
PopupMenuItem
<
AppBarBehavior
>>[
new
PopupMenuItem
<
AppBarBehavior
>(
value:
AppBarBehavior
.
scroll
,
child:
new
Text
(
'
AppB
ar scrolls away'
)
child:
new
Text
(
'
Toolb
ar scrolls away'
)
),
new
PopupMenuItem
<
AppBarBehavior
>(
value:
AppBarBehavior
.
under
,
child:
new
Text
(
'
AppB
ar stays put'
)
child:
new
Text
(
'
Toolb
ar stays put'
)
)
]
)
...
...
examples/material_gallery/lib/demo/full_screen_dialog_demo.dart
View file @
41338c35
...
...
@@ -149,7 +149,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
icon:
Icons
.
clear
,
onPressed:
()
{
handleDismissButton
(
context
);
}
),
title:
new
Text
(
'New
E
vent'
),
title:
new
Text
(
'New
e
vent'
),
actions:
<
Widget
>
[
new
FlatButton
(
child:
new
Text
(
'SAVE'
,
style:
theme
.
textTheme
.
body1
.
copyWith
(
color:
Colors
.
white
)),
...
...
examples/material_gallery/lib/demo/grid_list_demo.dart
View file @
41338c35
...
...
@@ -180,7 +180,7 @@ class GridListDemoState extends State<GridListDemo> {
final
Orientation
orientation
=
MediaQuery
.
of
(
context
).
orientation
;
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
'Grid
L
ist'
),
title:
new
Text
(
'Grid
l
ist'
),
actions:
<
Widget
>[
new
IconButton
(
icon:
Icons
.
more_vert
,
...
...
examples/material_gallery/lib/demo/leave_behind_demo.dart
View file @
41338c35
...
...
@@ -130,7 +130,7 @@ class LeaveBehindDemoState extends State<LeaveBehindDemo> {
return
new
Scaffold
(
key:
_scaffoldKey
,
appBar:
new
AppBar
(
title:
new
Text
(
'Swipe
Items to D
ismiss'
),
title:
new
Text
(
'Swipe
items to d
ismiss'
),
actions:
<
Widget
>[
new
PopupMenuButton
<
LeaveBehindDemoAction
>(
onSelected:
handleDemoAction
,
...
...
examples/material_gallery/lib/demo/list_demo.dart
View file @
41338c35
...
...
@@ -77,7 +77,7 @@ class ListDemoState extends State<ListDemo> {
),
new
ListItem
(
dense:
true
,
title:
new
Text
(
'Show
A
vatar'
),
title:
new
Text
(
'Show
a
vatar'
),
trailing:
new
Checkbox
(
value:
_showAvatars
,
onChanged:
(
bool
value
)
{
...
...
@@ -90,7 +90,7 @@ class ListDemoState extends State<ListDemo> {
),
new
ListItem
(
dense:
true
,
title:
new
Text
(
'Show
I
con'
),
title:
new
Text
(
'Show
i
con'
),
trailing:
new
Checkbox
(
value:
_showIcons
,
onChanged:
(
bool
value
)
{
...
...
@@ -103,7 +103,7 @@ class ListDemoState extends State<ListDemo> {
),
new
ListItem
(
dense:
true
,
title:
new
Text
(
'Show
D
ividers'
),
title:
new
Text
(
'Show
d
ividers'
),
trailing:
new
Checkbox
(
value:
_showDividers
,
onChanged:
(
bool
value
)
{
...
...
@@ -116,7 +116,7 @@ class ListDemoState extends State<ListDemo> {
),
new
ListItem
(
dense:
true
,
title:
new
Text
(
'Dense
L
ayout'
),
title:
new
Text
(
'Dense
l
ayout'
),
trailing:
new
Checkbox
(
value:
_dense
,
onChanged:
(
bool
value
)
{
...
...
@@ -148,7 +148,7 @@ class ListDemoState extends State<ListDemo> {
isThreeLine:
_itemSize
==
ListDemoItemSize
.
threeLine
,
dense:
_dense
,
leading:
_showAvatars
?
new
CircleAvatar
(
child:
new
Text
(
item
))
:
null
,
title:
new
Text
(
'This item represents
$item
'
),
title:
new
Text
(
'This item represents
$item
.
'
),
subtitle:
secondary
,
trailing:
_showIcons
?
new
Icon
(
icon:
Icons
.
info
,
color:
Theme
.
of
(
context
).
disabledColor
)
:
null
);
...
...
@@ -177,7 +177,7 @@ class ListDemoState extends State<ListDemo> {
return
new
Scaffold
(
key:
scaffoldKey
,
appBar:
new
AppBar
(
title:
new
Text
(
'Scrolling
L
ist
\n
$itemSizeText$layoutText
'
),
title:
new
Text
(
'Scrolling
l
ist
\n
$itemSizeText$layoutText
'
),
actions:
<
Widget
>[
new
IconButton
(
icon:
Icons
.
sort_by_alpha
,
...
...
examples/material_gallery/lib/demo/menu_demo.dart
View file @
41338c35
...
...
@@ -66,12 +66,12 @@ class MenuDemoState extends State<MenuDemo> {
onSelected:
showMenuSelection
,
itemBuilder:
(
BuildContext
context
)
=>
<
PopupMenuItem
<
String
>>[
new
PopupMenuItem
<
String
>(
value:
'
AppBar M
enu'
,
child:
new
Text
(
'
AppBar M
enu'
)
value:
'
Toolbar m
enu'
,
child:
new
Text
(
'
Toolbar m
enu'
)
),
new
PopupMenuItem
<
String
>(
value:
'Right
H
ere'
,
child:
new
Text
(
'Right
H
ere'
)
value:
'Right
h
ere'
,
child:
new
Text
(
'Right
h
ere'
)
),
new
PopupMenuItem
<
String
>(
value:
'Hooray!'
,
...
...
@@ -133,7 +133,7 @@ class MenuDemoState extends State<MenuDemo> {
value:
'Get Link'
,
child:
new
ListItem
(
leading:
new
Icon
(
icon:
Icons
.
link
),
title:
new
Text
(
'Get
L
ink'
)
title:
new
Text
(
'Get
l
ink'
)
)
),
new
PopupMenuDivider
(),
...
...
examples/material_gallery/lib/demo/modal_bottom_sheet_demo.dart
View file @
41338c35
...
...
@@ -14,7 +14,7 @@ class ModalBottomSheetDemo extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
"Modal Bottom Sheet"
)),
appBar:
new
AppBar
(
title:
new
Text
(
'Modal bottom sheet'
)),
body:
new
Center
(
child:
new
RaisedButton
(
child:
new
Text
(
'SHOW BOTTOM SHEET'
),
...
...
@@ -23,7 +23,7 @@ class ModalBottomSheetDemo extends StatelessWidget {
return
new
Container
(
child:
new
Padding
(
padding:
const
EdgeInsets
.
all
(
32.0
),
child:
new
Text
(
"This is the modal bottom sheet. Click anywhere to dismiss."
,
style:
textStyle
)
child:
new
Text
(
'This is the modal bottom sheet. Click anywhere to dismiss.'
,
style:
textStyle
)
)
);
});
...
...
examples/material_gallery/lib/demo/page_selector_demo.dart
View file @
41338c35
...
...
@@ -24,7 +24,7 @@ class PageSelectorDemo extends StatelessWidget {
];
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
'Page
S
elector'
)),
appBar:
new
AppBar
(
title:
new
Text
(
'Page
s
elector'
)),
body:
new
TabBarSelection
<
IconData
>(
values:
icons
,
child:
new
Builder
(
...
...
examples/material_gallery/lib/demo/persistent_bottom_sheet_demo.dart
View file @
41338c35
...
...
@@ -38,7 +38,7 @@ class _PersistentBottomSheetDemoState extends State<PersistentBottomSheetDemo> {
),
child:
new
Padding
(
padding:
const
EdgeInsets
.
all
(
32.0
),
child:
new
Text
(
"This is a Material persistent bottom sheet. Drag downwards to dismiss it."
,
style:
textStyle
)
child:
new
Text
(
'This is a Material persistent bottom sheet. Drag downwards to dismiss it.'
,
style:
textStyle
)
)
);
})
...
...
@@ -53,7 +53,7 @@ class _PersistentBottomSheetDemoState extends State<PersistentBottomSheetDemo> {
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
key:
_scaffoldKey
,
appBar:
new
AppBar
(
title:
new
Text
(
"Persistent Bottom Sheet"
)),
appBar:
new
AppBar
(
title:
new
Text
(
'Persistent bottom sheet'
)),
floatingActionButton:
new
FloatingActionButton
(
child:
new
Icon
(
icon:
Icons
.
add
),
backgroundColor:
Colors
.
redAccent
[
200
]
...
...
examples/material_gallery/lib/demo/progress_indicator_demo.dart
View file @
41338c35
...
...
@@ -73,7 +73,7 @@ class _ProgressIndicatorDemoState extends State<ProgressIndicatorDemo> {
height:
30.0
,
child:
new
CircularProgressIndicator
(
value:
animation
.
value
)
),
new
Text
(
"
${(animation.value * 100.0).toStringAsFixed(1)}
%"
+
(
controller
.
isAnimating
?
''
:
' (paused)'
)
)
new
Text
(
'
${(animation.value * 100.0).toStringAsFixed(1)}
%
${ controller.isAnimating ? "" : " (paused)" }
'
)
];
return
new
Column
(
children:
indicators
...
...
@@ -86,7 +86,7 @@ class _ProgressIndicatorDemoState extends State<ProgressIndicatorDemo> {
@override
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
'Progress
I
ndicators'
)),
appBar:
new
AppBar
(
title:
new
Text
(
'Progress
i
ndicators'
)),
body:
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
textTheme
.
title
,
child:
new
GestureDetector
(
...
...
examples/material_gallery/lib/demo/scrollable_tabs_demo.dart
View file @
41338c35
...
...
@@ -49,22 +49,22 @@ class ScrollableTabsDemoState extends State<ScrollableTabsDemo> {
values:
icons
,
child:
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
'Scrollable
T
abs'
),
title:
new
Text
(
'Scrollable
t
abs'
),
actions:
<
Widget
>[
new
PopupMenuButton
<
TabsDemoStyle
>(
onSelected:
changeDemoStyle
,
itemBuilder:
(
BuildContext
context
)
=>
<
PopupMenuItem
<
TabsDemoStyle
>>[
new
PopupMenuItem
<
TabsDemoStyle
>(
value:
TabsDemoStyle
.
iconsAndText
,
child:
new
Text
(
'Icons and
T
ext'
)
child:
new
Text
(
'Icons and
t
ext'
)
),
new
PopupMenuItem
<
TabsDemoStyle
>(
value:
TabsDemoStyle
.
iconsOnly
,
child:
new
Text
(
'Icons
O
nly'
)
child:
new
Text
(
'Icons
o
nly'
)
),
new
PopupMenuItem
<
TabsDemoStyle
>(
value:
TabsDemoStyle
.
textOnly
,
child:
new
Text
(
'Text
O
nly'
)
child:
new
Text
(
'Text
o
nly'
)
),
]
)
...
...
examples/material_gallery/lib/demo/scrolling_techniques_demo.dart
View file @
41338c35
...
...
@@ -116,7 +116,7 @@ class ScrollingTechniquesDemo extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
'Scrolling
T
echniques'
)),
appBar:
new
AppBar
(
title:
new
Text
(
'Scrolling
t
echniques'
)),
body:
new
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
16.0
),
child:
new
Block
(
...
...
examples/material_gallery/lib/demo/selection_controls_demo.dart
View file @
41338c35
...
...
@@ -35,7 +35,7 @@ class _SelectionControlsDemoState extends State<SelectionControlsDemo> {
@override
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
"Selection Controls"
)),
appBar:
new
AppBar
(
title:
new
Text
(
'Selection controls'
)),
body:
new
Column
(
children:
<
Widget
>[
new
Row
(
...
...
examples/material_gallery/lib/demo/snack_bar_demo.dart
View file @
41338c35
...
...
@@ -40,12 +40,12 @@ class _SnackBarDemoState extends State<SnackBarDemo> {
onPressed:
()
{
final
int
thisSnackBarIndex
=
_snackBarIndex
++;
Scaffold
.
of
(
context
).
showSnackBar
(
new
SnackBar
(
content:
new
Text
(
'This is
SnackBar #
$thisSnackBarIndex
'
),
content:
new
Text
(
'This is
snackbar #
$thisSnackBarIndex
.
'
),
action:
new
SnackBarAction
(
label:
'ACTION'
,
onPressed:
()
{
Scaffold
.
of
(
context
).
showSnackBar
(
new
SnackBar
(
content:
new
Text
(
"You pressed SnackBar
$thisSnackBarIndex
's Action"
)
content:
new
Text
(
'You pressed snackbar
$thisSnackBarIndex
\'
s action.'
)
));
}
)
...
...
@@ -70,7 +70,7 @@ class _SnackBarDemoState extends State<SnackBarDemo> {
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
'Snack
B
ar'
)
title:
new
Text
(
'Snack
b
ar'
)
),
body:
new
Builder
(
// Create an inner BuildContext so that the snackBar onPressed methods
...
...
examples/material_gallery/lib/demo/tabs_demo.dart
View file @
41338c35
...
...
@@ -48,7 +48,7 @@ class TabsDemoState extends State<TabsDemo> {
scrollableKey:
_selectedPage
.
key
,
appBarBehavior:
AppBarBehavior
.
under
,
appBar:
new
AppBar
(
title:
new
Text
(
'Tabs and
S
crolling'
),
title:
new
Text
(
'Tabs and
s
crolling'
),
tabBar:
new
TabBar
<
_Page
>(
labels:
new
Map
<
_Page
,
TabLabel
>.
fromIterable
(
_pages
,
value:
(
_Page
page
)
{
return
new
TabLabel
(
text:
page
.
label
);
...
...
examples/material_gallery/lib/demo/tabs_fab_demo.dart
View file @
41338c35
...
...
@@ -97,7 +97,7 @@ class _TabsFabDemoState extends State<TabsFabDemo> {
child:
new
Scaffold
(
key:
scaffoldKey
,
appBar:
new
AppBar
(
title:
new
Text
(
"FAB per Tab"
),
title:
new
Text
(
'FAB per tab'
),
tabBar:
new
TabBar
<
_Page
>(
labels:
new
Map
<
_Page
,
TabLabel
>.
fromIterable
(
pages
,
value:
(
_Page
page
)
=>
page
.
tabLabel
)
)
...
...
examples/material_gallery/lib/demo/text_field_demo.dart
View file @
41338c35
...
...
@@ -61,7 +61,7 @@ class TextFieldDemoState extends State<TextFieldDemo> {
return
new
Scaffold
(
key:
_scaffoldKey
,
appBar:
new
AppBar
(
title:
new
Text
(
'Text
F
ields'
)
title:
new
Text
(
'Text
f
ields'
)
),
body:
new
Form
(
onSubmitted:
_handleSubmitted
,
...
...
examples/material_gallery/lib/demo/time_picker_demo.dart
View file @
41338c35
...
...
@@ -29,7 +29,7 @@ class _TimePickerDemoState extends State<TimePickerDemo> {
@override
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
"Time Picker"
)),
appBar:
new
AppBar
(
title:
new
Text
(
'Time picker'
)),
body:
new
Column
(
children:
<
Widget
>[
new
Text
(
'
$_selectedTime
'
),
...
...
examples/material_gallery/lib/demo/tooltip_demo.dart
View file @
41338c35
...
...
@@ -34,7 +34,7 @@ class TooltipDemo extends StatelessWidget {
color:
theme
.
primaryColor
)
),
new
Text
(
' icon'
,
style:
theme
.
textTheme
.
subhead
)
new
Text
(
' icon
.
'
,
style:
theme
.
textTheme
.
subhead
)
]
),
new
Center
(
...
...
@@ -45,7 +45,7 @@ class TooltipDemo extends StatelessWidget {
tooltip:
'place a phone call'
,
onPressed:
()
{
Scaffold
.
of
(
context
).
showSnackBar
(
new
SnackBar
(
content:
new
Text
(
'That was an ordinary tap'
)
content:
new
Text
(
'That was an ordinary tap
.
'
)
));
}
)
...
...
examples/material_gallery/lib/demo/two_level_list_demo.dart
View file @
41338c35
...
...
@@ -8,7 +8,7 @@ class TwoLevelListDemo extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
'Expand/
Collapse List C
ontrol'
)),
appBar:
new
AppBar
(
title:
new
Text
(
'Expand/
collapse list c
ontrol'
)),
body:
new
TwoLevelList
(
type:
MaterialListType
.
oneLine
,
items:
<
Widget
>[
...
...
examples/material_gallery/lib/demo/weather_demo.dart
View file @
41338c35
...
...
@@ -65,7 +65,7 @@ class _WeatherDemoState extends State<WeatherDemo> {
if
(!
assetsLoaded
)
{
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
"Weather"
)
title:
new
Text
(
'Weather'
)
),
body:
new
Container
(
decoration:
new
BoxDecoration
(
...
...
@@ -77,7 +77,7 @@ class _WeatherDemoState extends State<WeatherDemo> {
return
new
Scaffold
(
appBar:
new
AppBar
(
title:
new
Text
(
"Weather"
)
title:
new
Text
(
'Weather'
)
),
body:
new
Material
(
child:
new
Stack
(
...
...
examples/material_gallery/lib/gallery/home.dart
View file @
41338c35
...
...
@@ -85,7 +85,7 @@ class GalleryHomeState extends State<GalleryHome> {
expandedHeight:
_kFlexibleSpaceMaxHeight
,
flexibleSpace:
(
BuildContext
context
)
=>
new
FlexibleSpaceBar
(
image:
new
GalleryHeader
(),
title:
new
Text
(
"Flutter
G
allery"
)
title:
new
Text
(
"Flutter
g
allery"
)
)
),
scrollableKey:
_listKey
,
...
...
@@ -101,38 +101,38 @@ class GalleryHomeState extends State<GalleryHome> {
children:
<
Widget
>[
new
GalleryItem
(
title:
"Weather"
,
builder:
()
=>
new
WeatherDemo
()),
new
GalleryItem
(
title:
"Fitness"
,
builder:
()
=>
new
FitnessDemo
()),
new
GalleryItem
(
title:
"Fancy
L
ines"
,
builder:
()
=>
new
DrawingDemo
()),
new
GalleryItem
(
title:
"Fancy
l
ines"
,
builder:
()
=>
new
DrawingDemo
()),
]
),
new
TwoLevelSublist
(
leading:
new
Icon
(
icon:
Icons
.
extension
),
title:
new
Text
(
"Components"
),
children:
<
Widget
>[
new
GalleryItem
(
title:
'App Bar'
,
builder:
()
=>
new
FlexibleSpaceDemo
()),
new
GalleryItem
(
title:
'Buttons'
,
builder:
()
=>
new
ButtonsDemo
()),
new
GalleryItem
(
title:
'Buttons:
Floating Action B
utton'
,
builder:
()
=>
new
TabsFabDemo
()),
new
GalleryItem
(
title:
'Buttons:
floating action b
utton'
,
builder:
()
=>
new
TabsFabDemo
()),
new
GalleryItem
(
title:
'Cards'
,
builder:
()
=>
new
CardsDemo
()),
new
GalleryItem
(
title:
'Chips'
,
builder:
()
=>
new
ChipDemo
()),
new
GalleryItem
(
title:
'Date
P
icker'
,
builder:
()
=>
new
DatePickerDemo
()),
new
GalleryItem
(
title:
'Date
p
icker'
,
builder:
()
=>
new
DatePickerDemo
()),
new
GalleryItem
(
title:
'Dialog'
,
builder:
()
=>
new
DialogDemo
()),
new
GalleryItem
(
title:
'Drop
down B
utton'
,
builder:
()
=>
new
DropDownDemo
()),
new
GalleryItem
(
title:
'Expand/
Collapse List C
ontrol'
,
builder:
()
=>
new
TwoLevelListDemo
()),
new
GalleryItem
(
title:
'Drop
-down b
utton'
,
builder:
()
=>
new
DropDownDemo
()),
new
GalleryItem
(
title:
'Expand/
collapse list c
ontrol'
,
builder:
()
=>
new
TwoLevelListDemo
()),
new
GalleryItem
(
title:
'Grid'
,
builder:
()
=>
new
GridListDemo
()),
new
GalleryItem
(
title:
'Icons'
,
builder:
()
=>
new
IconsDemo
()),
new
GalleryItem
(
title:
'Leave-behind
List I
tems'
,
builder:
()
=>
new
LeaveBehindDemo
()),
new
GalleryItem
(
title:
'Leave-behind
list i
tems'
,
builder:
()
=>
new
LeaveBehindDemo
()),
new
GalleryItem
(
title:
'List'
,
builder:
()
=>
new
ListDemo
()),
new
GalleryItem
(
title:
'Modal Bottom Sheet'
,
builder:
()
=>
new
ModalBottomSheetDemo
()),
new
GalleryItem
(
title:
'Menus'
,
builder:
()
=>
new
MenuDemo
()),
new
GalleryItem
(
title:
'Page Selector'
,
builder:
()
=>
new
PageSelectorDemo
()),
new
GalleryItem
(
title:
'Persistent Bottom Sheet'
,
builder:
()
=>
new
PersistentBottomSheetDemo
()),
new
GalleryItem
(
title:
'Progress Indicators'
,
builder:
()
=>
new
ProgressIndicatorDemo
()),
new
GalleryItem
(
title:
'Scrollable Tabs'
,
builder:
()
=>
new
ScrollableTabsDemo
()),
new
GalleryItem
(
title:
'Selection Controls'
,
builder:
()
=>
new
SelectionControlsDemo
()),
new
GalleryItem
(
title:
'Modal bottom sheet'
,
builder:
()
=>
new
ModalBottomSheetDemo
()),
new
GalleryItem
(
title:
'Page selector'
,
builder:
()
=>
new
PageSelectorDemo
()),
new
GalleryItem
(
title:
'Persistent bottom sheet'
,
builder:
()
=>
new
PersistentBottomSheetDemo
()),
new
GalleryItem
(
title:
'Progress indicators'
,
builder:
()
=>
new
ProgressIndicatorDemo
()),
new
GalleryItem
(
title:
'Scrollable tabs'
,
builder:
()
=>
new
ScrollableTabsDemo
()),
new
GalleryItem
(
title:
'Selection controls'
,
builder:
()
=>
new
SelectionControlsDemo
()),
new
GalleryItem
(
title:
'Sliders'
,
builder:
()
=>
new
SliderDemo
()),
new
GalleryItem
(
title:
'Snack
B
ar'
,
builder:
()
=>
new
SnackBarDemo
()),
new
GalleryItem
(
title:
'Snack
b
ar'
,
builder:
()
=>
new
SnackBarDemo
()),
new
GalleryItem
(
title:
'Tabs'
,
builder:
()
=>
new
TabsDemo
()),
new
GalleryItem
(
title:
'Text Fields'
,
builder:
()
=>
new
TextFieldDemo
()),
new
GalleryItem
(
title:
'Time Picker'
,
builder:
()
=>
new
TimePickerDemo
()),
new
GalleryItem
(
title:
'Text fields'
,
builder:
()
=>
new
TextFieldDemo
()),
new
GalleryItem
(
title:
'Time picker'
,
builder:
()
=>
new
TimePickerDemo
()),
new
GalleryItem
(
title:
'Toolbar'
,
builder:
()
=>
new
FlexibleSpaceDemo
()),
new
GalleryItem
(
title:
'Tooltips'
,
builder:
()
=>
new
TooltipDemo
()),
]
),
...
...
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