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
0d0861b3
Commit
0d0861b3
authored
Apr 21, 2017
by
Adam Barth
Committed by
GitHub
Apr 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The const will continue until morale improves (#9536)
parent
76ecb0b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
29 deletions
+29
-29
main.dart
dev/benchmarks/complex_layout/lib/main.dart
+24
-24
home.dart
examples/flutter_gallery/lib/gallery/home.dart
+2
-2
box_sliver_mismatch_test.dart
packages/flutter/test/widgets/box_sliver_mismatch_test.dart
+3
-3
No files found.
dev/benchmarks/complex_layout/lib/main.dart
View file @
0d0861b3
...
...
@@ -96,45 +96,45 @@ class TopBarMenu extends StatelessWidget {
return
new
PopupMenuButton
<
String
>(
onSelected:
(
String
value
)
{
print
(
'Selected:
$value
'
);
},
itemBuilder:
(
BuildContext
context
)
=>
<
PopupMenuItem
<
String
>>[
new
PopupMenuItem
<
String
>(
const
PopupMenuItem
<
String
>(
value:
'Friends'
,
child:
new
MenuItemWithIcon
(
Icons
.
people
,
'Friends'
,
'5 new'
)
child:
const
MenuItemWithIcon
(
Icons
.
people
,
'Friends'
,
'5 new'
)
),
const
PopupMenuItem
<
String
>(
value:
'Events'
,
child:
const
MenuItemWithIcon
(
Icons
.
event
,
'Events'
,
'12 upcoming'
)
),
new
PopupMenuItem
<
String
>(
const
PopupMenuItem
<
String
>(
value:
'Events'
,
child:
new
MenuItemWithIcon
(
Icons
.
group
,
'Groups'
,
'14'
)
child:
const
MenuItemWithIcon
(
Icons
.
group
,
'Groups'
,
'14'
)
),
new
PopupMenuItem
<
String
>(
const
PopupMenuItem
<
String
>(
value:
'Events'
,
child:
new
MenuItemWithIcon
(
Icons
.
image
,
'Pictures'
,
'12'
)
child:
const
MenuItemWithIcon
(
Icons
.
image
,
'Pictures'
,
'12'
)
),
new
PopupMenuItem
<
String
>(
const
PopupMenuItem
<
String
>(
value:
'Events'
,
child:
new
MenuItemWithIcon
(
Icons
.
near_me
,
'Nearby'
,
'33'
)
child:
const
MenuItemWithIcon
(
Icons
.
near_me
,
'Nearby'
,
'33'
)
),
new
PopupMenuItem
<
String
>(
const
PopupMenuItem
<
String
>(
value:
'Friends'
,
child:
new
MenuItemWithIcon
(
Icons
.
people
,
'Friends'
,
'5'
)
child:
const
MenuItemWithIcon
(
Icons
.
people
,
'Friends'
,
'5'
)
),
const
PopupMenuItem
<
String
>(
value:
'Events'
,
child:
const
MenuItemWithIcon
(
Icons
.
event
,
'Events'
,
'12'
)
),
new
PopupMenuItem
<
String
>(
const
PopupMenuItem
<
String
>(
value:
'Events'
,
child:
new
MenuItemWithIcon
(
Icons
.
group
,
'Groups'
,
'14'
)
child:
const
MenuItemWithIcon
(
Icons
.
group
,
'Groups'
,
'14'
)
),
new
PopupMenuItem
<
String
>(
const
PopupMenuItem
<
String
>(
value:
'Events'
,
child:
new
MenuItemWithIcon
(
Icons
.
image
,
'Pictures'
,
'12'
)
child:
const
MenuItemWithIcon
(
Icons
.
image
,
'Pictures'
,
'12'
)
),
new
PopupMenuItem
<
String
>(
const
PopupMenuItem
<
String
>(
value:
'Events'
,
child:
new
MenuItemWithIcon
(
Icons
.
near_me
,
'Nearby'
,
'33'
)
child:
const
MenuItemWithIcon
(
Icons
.
near_me
,
'Nearby'
,
'33'
)
)
]
);
...
...
@@ -234,7 +234,7 @@ class IconBar extends StatelessWidget {
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
<
Widget
>[
const
IconWithText
(
Icons
.
thumb_up
,
'Like'
),
new
IconWithText
(
Icons
.
comment
,
'Comment'
),
const
IconWithText
(
Icons
.
comment
,
'Comment'
),
const
IconWithText
(
Icons
.
share
,
'Share'
),
]
)
...
...
@@ -530,13 +530,13 @@ class BottomBar extends StatelessWidget {
child:
new
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
<
Widget
>[
new
BottomBarButton
(
Icons
.
new_releases
,
'News'
),
new
BottomBarButton
(
Icons
.
people
,
'Requests'
),
new
BottomBarButton
(
Icons
.
chat
,
'Messenger'
),
new
BottomBarButton
(
Icons
.
bookmark
,
'Bookmark'
),
new
BottomBarButton
(
Icons
.
alarm
,
'Alarm'
)
]
)
const
BottomBarButton
(
Icons
.
new_releases
,
'News'
),
const
BottomBarButton
(
Icons
.
people
,
'Requests'
),
const
BottomBarButton
(
Icons
.
chat
,
'Messenger'
),
const
BottomBarButton
(
Icons
.
bookmark
,
'Bookmark'
),
const
BottomBarButton
(
Icons
.
alarm
,
'Alarm'
),
]
,
)
,
);
}
}
...
...
examples/flutter_gallery/lib/gallery/home.dart
View file @
0d0861b3
...
...
@@ -169,10 +169,10 @@ class GalleryHomeState extends State<GalleryHome> with SingleTickerProviderState
new
SliverAppBar
(
pinned:
true
,
expandedHeight:
_kFlexibleSpaceMaxHeight
,
flexibleSpace:
new
FlexibleSpaceBar
(
flexibleSpace:
const
FlexibleSpaceBar
(
title:
const
Text
(
'Flutter Gallery'
),
// TODO(abarth): Wire up to the parallax in a way that doesn't pop during hero transition.
background:
new
_AppBarBackground
(
animation:
kAlwaysDismissedAnimation
),
background:
const
_AppBarBackground
(
animation:
kAlwaysDismissedAnimation
),
),
),
new
SliverList
(
delegate:
new
SliverChildListDelegate
(
_galleryListItems
())),
...
...
packages/flutter/test/widgets/box_sliver_mismatch_test.dart
View file @
0d0861b3
...
...
@@ -8,9 +8,9 @@ import 'package:flutter/widgets.dart';
void
main
(
)
{
testWidgets
(
'Sliver in a box'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
new
DecoratedBox
(
const
DecoratedBox
(
decoration:
const
BoxDecoration
(),
child:
new
SliverList
(
child:
const
SliverList
(
delegate:
const
SliverChildListDelegate
(
const
<
Widget
>[]),
),
),
...
...
@@ -21,7 +21,7 @@ void main() {
await
tester
.
pumpWidget
(
new
Row
(
children:
<
Widget
>[
new
SliverList
(
const
SliverList
(
delegate:
const
SliverChildListDelegate
(
const
<
Widget
>[]),
),
],
...
...
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