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
0e1b652d
Commit
0e1b652d
authored
Jun 20, 2017
by
Michael Goderbauer
Committed by
GitHub
Jun 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Demos in flutter_gallery more accessible (#10832)
Remaining known issues are #10831 and #10830.
parent
7d16a965
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
106 additions
and
98 deletions
+106
-98
contacts_demo.dart
examples/flutter_gallery/lib/demo/contacts_demo.dart
+8
-6
pesto_demo.dart
examples/flutter_gallery/lib/demo/pesto_demo.dart
+34
-32
shrine_home.dart
examples/flutter_gallery/lib/demo/shrine/shrine_home.dart
+64
-60
No files found.
examples/flutter_gallery/lib/demo/contacts_demo.dart
View file @
0e1b652d
...
@@ -70,12 +70,14 @@ class _ContactItem extends StatelessWidget {
...
@@ -70,12 +70,14 @@ class _ContactItem extends StatelessWidget {
)
)
));
));
}
}
return
new
Padding
(
return
new
MergeSemantics
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
16.0
),
child:
new
Padding
(
child:
new
Row
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
16.0
),
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
child:
new
Row
(
children:
rowChildren
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
)
children:
rowChildren
)
),
);
);
}
}
}
}
...
...
examples/flutter_gallery/lib/demo/pesto_demo.dart
View file @
0e1b652d
...
@@ -246,41 +246,43 @@ class RecipeCard extends StatelessWidget {
...
@@ -246,41 +246,43 @@ class RecipeCard extends StatelessWidget {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
new
GestureDetector
(
return
new
MergeSemantics
(
onTap:
onTap
,
child:
new
GestureDetector
(
child:
new
Card
(
onTap:
onTap
,
child:
new
Column
(
child:
new
Card
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
new
Column
(
children:
<
Widget
>[
crossAxisAlignment:
CrossAxisAlignment
.
start
,
new
Hero
(
children:
<
Widget
>[
tag:
recipe
.
imagePath
,
new
Hero
(
child:
new
Image
.
asset
(
recipe
.
imagePath
,
fit:
BoxFit
.
contain
)
tag:
recipe
.
imagePath
,
),
child:
new
Image
.
asset
(
recipe
.
imagePath
,
fit:
BoxFit
.
contain
)
new
Expanded
(
),
child:
new
Row
(
new
Expanded
(
children:
<
Widget
>[
child:
new
Row
(
new
Padding
(
children:
<
Widget
>[
padding:
const
EdgeInsets
.
all
(
16.0
),
new
Padding
(
child:
new
Image
.
asset
(
padding:
const
EdgeInsets
.
all
(
16.0
),
recipe
.
ingredientsImagePath
,
child:
new
Image
.
asset
(
width:
48.0
,
recipe
.
ingredientsImagePath
,
height:
48.0
,
width:
48.0
,
height:
48.0
,
),
),
),
),
new
Expanded
(
new
Expanded
(
child:
new
Column
(
child:
new
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
children:
<
Widget
>[
new
Text
(
recipe
.
name
,
style:
titleStyle
,
softWrap:
false
,
overflow:
TextOverflow
.
ellipsis
),
new
Text
(
recipe
.
name
,
style:
titleStyle
,
softWrap:
false
,
overflow:
TextOverflow
.
ellipsis
),
new
Text
(
recipe
.
author
,
style:
authorStyle
),
new
Text
(
recipe
.
author
,
style:
authorStyle
)
,
]
,
]
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
),
);
);
...
...
examples/flutter_gallery/lib/demo/shrine/shrine_home.dart
View file @
0e1b652d
...
@@ -252,39 +252,41 @@ class _Heading extends StatelessWidget {
...
@@ -252,39 +252,41 @@ class _Heading extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
final
Size
screenSize
=
MediaQuery
.
of
(
context
).
size
;
final
Size
screenSize
=
MediaQuery
.
of
(
context
).
size
;
final
ShrineTheme
theme
=
ShrineTheme
.
of
(
context
);
final
ShrineTheme
theme
=
ShrineTheme
.
of
(
context
);
return
new
SizedBox
(
return
new
MergeSemantics
(
height:
screenSize
.
width
>
screenSize
.
height
child:
new
SizedBox
(
?
(
screenSize
.
height
-
kToolbarHeight
)
*
0.85
height:
screenSize
.
width
>
screenSize
.
height
:
(
screenSize
.
height
-
kToolbarHeight
)
*
0.70
,
?
(
screenSize
.
height
-
kToolbarHeight
)
*
0.85
child:
new
Container
(
:
(
screenSize
.
height
-
kToolbarHeight
)
*
0.70
,
decoration:
new
BoxDecoration
(
child:
new
Container
(
color:
theme
.
cardBackgroundColor
,
decoration:
new
BoxDecoration
(
border:
new
Border
(
bottom:
new
BorderSide
(
color:
theme
.
dividerColor
)),
color:
theme
.
cardBackgroundColor
,
),
border:
new
Border
(
bottom:
new
BorderSide
(
color:
theme
.
dividerColor
)),
child:
new
CustomMultiChildLayout
(
),
delegate:
new
_HeadingLayout
(),
child:
new
CustomMultiChildLayout
(
children:
<
Widget
>[
delegate:
new
_HeadingLayout
(),
new
LayoutId
(
children:
<
Widget
>[
id:
_HeadingLayout
.
price
,
new
LayoutId
(
child:
new
_FeaturePriceItem
(
product:
product
),
id:
_HeadingLayout
.
price
,
),
child:
new
_FeaturePriceItem
(
product:
product
),
new
LayoutId
(
),
id:
_HeadingLayout
.
image
,
new
LayoutId
(
child:
new
Image
.
asset
(
product
.
imageAsset
,
fit:
BoxFit
.
cover
),
id:
_HeadingLayout
.
image
,
),
child:
new
Image
.
asset
(
product
.
imageAsset
,
fit:
BoxFit
.
cover
),
new
LayoutId
(
),
id:
_HeadingLayout
.
title
,
new
LayoutId
(
child:
new
Text
(
product
.
featureTitle
,
style:
theme
.
featureTitleStyle
),
id:
_HeadingLayout
.
title
,
),
child:
new
Text
(
product
.
featureTitle
,
style:
theme
.
featureTitleStyle
),
new
LayoutId
(
),
id:
_HeadingLayout
.
description
,
new
LayoutId
(
child:
new
Text
(
product
.
featureDescription
,
style:
theme
.
featureStyle
),
id:
_HeadingLayout
.
description
,
),
child:
new
Text
(
product
.
featureDescription
,
style:
theme
.
featureStyle
),
new
LayoutId
(
),
id:
_HeadingLayout
.
vendor
,
new
LayoutId
(
child:
new
_VendorItem
(
vendor:
product
.
vendor
),
id:
_HeadingLayout
.
vendor
,
),
child:
new
_VendorItem
(
vendor:
product
.
vendor
),
],
),
],
),
),
),
),
),
);
);
...
@@ -303,35 +305,37 @@ class _ProductItem extends StatelessWidget {
...
@@ -303,35 +305,37 @@ class _ProductItem extends StatelessWidget {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
new
Card
(
return
new
MergeSemantics
(
child:
new
Stack
(
child:
new
Card
(
children:
<
Widget
>[
child:
new
Stack
(
new
Column
(
children:
<
Widget
>[
children:
<
Widget
>[
new
Column
(
new
Align
(
children:
<
Widget
>[
alignment:
FractionalOffset
.
centerRight
,
new
Align
(
child:
new
_ProductPriceItem
(
product:
product
),
alignment:
FractionalOffset
.
centerRight
,
),
child:
new
_ProductPriceItem
(
product:
product
),
new
Container
(
),
width:
144.0
,
new
Container
(
height:
144.0
,
width:
144.0
,
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
8.0
),
height:
144.0
,
child:
new
Hero
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
8.0
),
tag:
product
.
tag
,
child:
new
Hero
(
child:
new
Image
.
asset
(
product
.
imageAsset
,
fit:
BoxFit
.
contain
),
tag:
product
.
tag
,
child:
new
Image
.
asset
(
product
.
imageAsset
,
fit:
BoxFit
.
contain
),
),
),
),
new
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
8.0
),
child:
new
_VendorItem
(
vendor:
product
.
vendor
),
),
),
new
Padding
(
],
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
8.0
),
),
child:
new
_VendorItem
(
vendor:
product
.
vendor
),
new
Material
(
),
type:
MaterialType
.
transparency
,
],
child:
new
InkWell
(
onTap:
onPressed
),
),
),
new
Material
(
],
type:
MaterialType
.
transparency
,
),
child:
new
InkWell
(
onTap:
onPressed
),
),
],
),
),
);
);
}
}
...
...
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