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
9b9ad3db
Commit
9b9ad3db
authored
Mar 13, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[rename fixit] RouteBuilder -> BuildContext
Fixes #2353
parent
f1331486
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
77 additions
and
85 deletions
+77
-85
card_collection.dart
dev/manual_tests/card_collection.dart
+2
-2
drag_and_drop.dart
dev/manual_tests/drag_and_drop.dart
+2
-2
mozart.dart
dev/manual_tests/mozart.dart
+1
-1
overlay_geometry.dart
dev/manual_tests/overlay_geometry.dart
+2
-2
pageable_list.dart
dev/manual_tests/pageable_list.dart
+2
-2
raw_keyboard.dart
dev/manual_tests/raw_keyboard.dart
+2
-2
gestures.dart
examples/layers/widgets/gestures.dart
+2
-2
media_query.dart
examples/layers/widgets/media_query.dart
+2
-2
sectors.dart
examples/layers/widgets/sectors.dart
+2
-2
styled_text.dart
examples/layers/widgets/styled_text.dart
+2
-2
app.dart
examples/material_gallery/lib/gallery/app.dart
+1
-1
main.dart
examples/stocks/lib/main.dart
+3
-3
app.dart
packages/flutter/lib/src/material/app.dart
+3
-5
app.dart
packages/flutter/lib/src/widgets/app.dart
+2
-8
bottom_sheet_rebuild_test.dart
packages/flutter/test/widget/bottom_sheet_rebuild_test.dart
+2
-2
bottom_sheet_test.dart
packages/flutter/test/widget/bottom_sheet_test.dart
+5
-5
draggable_test.dart
packages/flutter/test/widget/draggable_test.dart
+14
-14
drawer_test.dart
packages/flutter/test/widget/drawer_test.dart
+5
-5
heroes_test.dart
packages/flutter/test/widget/heroes_test.dart
+5
-5
modal_barrier_test.dart
packages/flutter/test/widget/modal_barrier_test.dart
+3
-3
navigator_test.dart
packages/flutter/test/widget/navigator_test.dart
+3
-3
page_transitions_test.dart
packages/flutter/test/widget/page_transitions_test.dart
+1
-1
snack_bar_test.dart
packages/flutter/test/widget/snack_bar_test.dart
+6
-6
two_level_list_test.dart
packages/flutter/test/widget/two_level_list_test.dart
+1
-1
demo.dart
packages/flutter_markdown/example/demo.dart
+2
-2
main.dart.tmpl
packages/flutter_tools/templates/create/lib/main.dart.tmpl
+2
-2
No files found.
dev/manual_tests/card_collection.dart
View file @
9b9ad3db
...
...
@@ -462,8 +462,8 @@ class CardCollectionState extends State<CardCollection> {
void
main
(
)
{
runApp
(
new
MaterialApp
(
title:
'Cards'
,
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
=>
new
CardCollection
(),
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
=>
new
CardCollection
(),
}
));
}
dev/manual_tests/drag_and_drop.dart
View file @
9b9ad3db
...
...
@@ -283,8 +283,8 @@ class DragAndDropAppState extends State<DragAndDropApp> {
void
main
(
)
{
runApp
(
new
MaterialApp
(
title:
'Drag and Drop Flutter Demo'
,
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
=>
new
DragAndDropApp
()
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
=>
new
DragAndDropApp
()
}
));
}
dev/manual_tests/mozart.dart
View file @
9b9ad3db
...
...
@@ -238,6 +238,6 @@ class _WindowManagerState extends State<WindowManager> {
void
main
(
)
{
runApp
(
new
MaterialApp
(
title:
'Mozart'
,
routes:
<
String
,
Route
Builder
>{
'/'
:
(
_
)
=>
new
WindowManager
()
}
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
_
)
=>
new
WindowManager
()
}
));
}
dev/manual_tests/overlay_geometry.dart
View file @
9b9ad3db
...
...
@@ -179,8 +179,8 @@ void main() {
accentColor:
Colors
.
redAccent
[
200
]
),
title:
'Cards'
,
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
=>
new
OverlayGeometryApp
()
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
=>
new
OverlayGeometryApp
()
}
));
}
dev/manual_tests/pageable_list.dart
View file @
9b9ad3db
...
...
@@ -142,8 +142,8 @@ void main() {
primarySwatch:
Colors
.
blue
,
accentColor:
Colors
.
redAccent
[
200
]
),
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
=>
new
PageableListApp
(),
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
=>
new
PageableListApp
(),
}
));
}
dev/manual_tests/raw_keyboard.dart
View file @
9b9ad3db
...
...
@@ -12,8 +12,8 @@ void main() {
runApp
(
new
MaterialApp
(
title:
"Hardware Key Demo"
,
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Scaffold
(
toolBar:
new
ToolBar
(
center:
new
Text
(
"Hardware Key Demo"
)
...
...
examples/layers/widgets/gestures.dart
View file @
9b9ad3db
...
...
@@ -214,8 +214,8 @@ class _GestureDemoState extends State<GestureDemo> {
void
main
(
)
{
runApp
(
new
MaterialApp
(
theme:
new
ThemeData
.
dark
(),
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Scaffold
(
toolBar:
new
ToolBar
(
center:
new
Text
(
'Gestures Demo'
)),
...
...
examples/layers/widgets/media_query.dart
View file @
9b9ad3db
...
...
@@ -97,8 +97,8 @@ final List<String> _kNames = _initNames();
void
main
(
)
{
runApp
(
new
MaterialApp
(
title:
'Media Query Example'
,
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Scaffold
(
toolBar:
new
ToolBar
(
center:
new
Text
(
'Media Query Example'
)
...
...
examples/layers/widgets/sectors.dart
View file @
9b9ad3db
...
...
@@ -151,8 +151,8 @@ class SectorAppState extends State<SectorApp> {
return
new
MaterialApp
(
theme:
new
ThemeData
.
light
(),
title:
'Sector Layout'
,
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Scaffold
(
toolBar:
new
ToolBar
(
center:
new
Text
(
'Sector Layout in a Widget Tree'
)
...
...
examples/layers/widgets/styled_text.dart
View file @
9b9ad3db
...
...
@@ -118,8 +118,8 @@ class _StyledTextDemoState extends State<StyledTextDemo> {
void
main
(
)
{
runApp
(
new
MaterialApp
(
theme:
new
ThemeData
.
light
(),
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Scaffold
(
toolBar:
new
ToolBar
(
center:
new
Text
(
'Hal and Dave'
)),
...
...
examples/material_gallery/lib/gallery/app.dart
View file @
9b9ad3db
...
...
@@ -28,7 +28,7 @@ class GalleryAppState extends State<GalleryApp> {
title:
'Flutter Material Gallery'
,
theme:
lightTheme
?
new
ThemeData
.
light
()
:
new
ThemeData
.
dark
(),
routes:
{
'/'
:
(
RouteArguments
args
)
=>
new
GalleryHome
()
'/'
:
(
BuildContext
context
)
=>
new
GalleryHome
()
}
);
}
...
...
examples/stocks/lib/main.dart
View file @
9b9ad3db
...
...
@@ -114,9 +114,9 @@ class StocksAppState extends State<StocksApp> {
debugShowMaterialGrid:
_configuration
.
debugShowGrid
,
showPerformanceOverlay:
_configuration
.
showPerformanceOverlay
,
showSemanticsDebugger:
_configuration
.
showSemanticsDebugger
,
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
=>
new
StockHome
(
_stocks
,
_symbols
,
_configuration
,
configurationUpdater
),
'/settings'
:
(
RouteArguments
args
)
=>
new
StockSettings
(
_configuration
,
configurationUpdater
)
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
=>
new
StockHome
(
_stocks
,
_symbols
,
_configuration
,
configurationUpdater
),
'/settings'
:
(
BuildContext
context
)
=>
new
StockSettings
(
_configuration
,
configurationUpdater
)
},
onGenerateRoute:
_getRoute
,
onLocaleChanged:
_onLocaleChanged
...
...
packages/flutter/lib/src/material/app.dart
View file @
9b9ad3db
...
...
@@ -28,7 +28,7 @@ class MaterialApp extends WidgetsApp {
Key
key
,
String
title
,
ThemeData
theme
,
Map
<
String
,
RouteBuilder
>
routes:
const
<
String
,
Route
Builder
>{},
Map
<
String
,
WidgetBuilder
>
routes:
const
<
String
,
Widget
Builder
>{},
RouteFactory
onGenerateRoute
,
LocaleChangedCallback
onLocaleChanged
,
this
.
debugShowMaterialGrid
:
false
,
...
...
@@ -43,12 +43,10 @@ class MaterialApp extends WidgetsApp {
color:
theme
?.
primaryColor
??
Colors
.
blue
[
500
],
// blue[500] is the primary color of the default theme
routes:
routes
,
onGenerateRoute:
(
RouteSettings
settings
)
{
Route
Builder
builder
=
routes
[
settings
.
name
];
Widget
Builder
builder
=
routes
[
settings
.
name
];
if
(
builder
!=
null
)
{
return
new
MaterialPageRoute
<
Null
>(
builder:
(
BuildContext
context
)
{
return
builder
(
new
RouteArguments
(
context:
context
));
},
builder:
builder
,
settings:
settings
);
}
...
...
packages/flutter/lib/src/widgets/app.dart
View file @
9b9ad3db
...
...
@@ -28,12 +28,6 @@ AssetBundle _initDefaultBundle() {
final
AssetBundle
_defaultBundle
=
_initDefaultBundle
();
class
RouteArguments
{
const
RouteArguments
({
this
.
context
});
final
BuildContext
context
;
}
typedef
Widget
RouteBuilder
(
RouteArguments
args
);
typedef
Future
<
LocaleQueryData
>
LocaleChangedCallback
(
Locale
locale
);
class
WidgetsApp
extends
StatefulWidget
{
...
...
@@ -42,7 +36,7 @@ class WidgetsApp extends StatefulWidget {
this
.
title
,
this
.
textStyle
,
this
.
color
,
this
.
routes
:
const
<
String
,
Route
Builder
>{},
this
.
routes
:
const
<
String
,
Widget
Builder
>{},
this
.
onGenerateRoute
,
this
.
onLocaleChanged
,
this
.
showPerformanceOverlay
:
false
,
...
...
@@ -72,7 +66,7 @@ class WidgetsApp extends StatefulWidget {
/// [Navigator] is given a named route, the name will be looked up
/// in this table first. If the name is not available, then
/// [onGenerateRoute] will be called instead.
final
Map
<
String
,
Route
Builder
>
routes
;
final
Map
<
String
,
Widget
Builder
>
routes
;
/// The route generator callback used when the app is navigated to a
/// named route but the name is not in the [routes] table.
...
...
packages/flutter/test/widget/bottom_sheet_rebuild_test.dart
View file @
9b9ad3db
...
...
@@ -14,8 +14,8 @@ void main() {
int
buildCount
=
0
;
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Scaffold
(
key:
scaffoldKey
,
body:
new
Center
(
child:
new
Text
(
'body'
))
...
...
packages/flutter/test/widget/bottom_sheet_test.dart
View file @
9b9ad3db
...
...
@@ -14,9 +14,9 @@ void main() {
bool
showBottomSheetThenCalled
=
false
;
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
context
=
args
.
context
;
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
ctx
)
{
context
=
ctx
;
return
new
Container
();
}
}
...
...
@@ -66,8 +66,8 @@ void main() {
bool
showBottomSheetThenCalled
=
false
;
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Scaffold
(
key:
scaffoldKey
,
body:
new
Center
(
child:
new
Text
(
'body'
))
...
...
packages/flutter/test/widget/draggable_test.dart
View file @
9b9ad3db
...
...
@@ -12,8 +12,8 @@ void main() {
List
<
dynamic
>
accepted
=
<
dynamic
>[];
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
return
new
Column
(
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Column
(
children:
<
Widget
>[
new
Draggable
<
int
>(
data:
1
,
...
...
@@ -75,8 +75,8 @@ void main() {
Point
firstLocation
,
secondLocation
;
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
return
new
Column
(
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Column
(
children:
<
Widget
>[
new
Draggable
<
int
>(
data:
1
,
...
...
@@ -173,8 +173,8 @@ void main() {
Point
firstLocation
,
secondLocation
;
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
return
new
Column
(
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Column
(
children:
<
Widget
>[
new
Draggable
<
int
>(
data:
1
,
...
...
@@ -234,8 +234,8 @@ void main() {
Point
firstLocation
,
secondLocation
;
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
return
new
Column
(
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Column
(
children:
<
Widget
>[
new
LongPressDraggable
<
int
>(
data:
1
,
...
...
@@ -285,8 +285,8 @@ void main() {
Point
firstLocation
,
secondLocation
;
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
return
new
Column
(
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Column
(
children:
<
Widget
>[
new
Draggable
<
int
>(
data:
1
,
...
...
@@ -337,8 +337,8 @@ void main() {
Point
firstLocation
,
secondLocation
,
thirdLocation
;
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Block
(
children:
<
Widget
>[
new
DragTarget
<
int
>(
...
...
@@ -448,8 +448,8 @@ void main() {
Point
firstLocation
,
secondLocation
,
thirdLocation
;
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Block
(
scrollDirection:
Axis
.
horizontal
,
children:
<
Widget
>[
...
...
packages/flutter/test/widget/drawer_test.dart
View file @
9b9ad3db
...
...
@@ -15,9 +15,9 @@ void main() {
BuildContext
context
;
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
context
=
args
.
context
;
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
ctx
)
{
context
=
ctx
;
return
new
Scaffold
(
key:
scaffoldKey
,
drawer:
new
Text
(
'drawer'
),
...
...
@@ -48,8 +48,8 @@ void main() {
tester
.
pumpWidget
(
new
Container
());
// throw away the old App and its Navigator
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Scaffold
(
key:
scaffoldKey
,
drawer:
new
Text
(
'drawer'
),
...
...
packages/flutter/test/widget/heroes_test.dart
View file @
9b9ad3db
...
...
@@ -12,21 +12,21 @@ Key firstKey = new Key('first');
Key
secondKey
=
new
Key
(
'second'
);
Key
thirdKey
=
new
Key
(
'third'
);
final
Map
<
String
,
RouteBuilder
>
routes
=
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
=>
new
Material
(
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
=>
new
Material
(
child:
new
Block
(
children:
<
Widget
>[
new
Container
(
height:
100.0
,
width:
100.0
),
new
Card
(
child:
new
Hero
(
tag:
'a'
,
child:
new
Container
(
height:
100.0
,
width:
100.0
,
key:
firstKey
))),
new
Container
(
height:
100.0
,
width:
100.0
),
new
FlatButton
(
child:
new
Text
(
'two'
),
onPressed:
()
=>
Navigator
.
pushNamed
(
args
.
context
,
'/two'
)),
new
FlatButton
(
child:
new
Text
(
'two'
),
onPressed:
()
=>
Navigator
.
pushNamed
(
context
,
'/two'
)),
])
),
'/two'
:
(
RouteArguments
args
)
=>
new
Material
(
'/two'
:
(
BuildContext
context
)
=>
new
Material
(
child:
new
Block
(
children:
<
Widget
>[
new
Container
(
height:
150.0
,
width:
150.0
),
new
Card
(
child:
new
Hero
(
tag:
'a'
,
child:
new
Container
(
height:
150.0
,
width:
150.0
,
key:
secondKey
))),
new
Container
(
height:
150.0
,
width:
150.0
),
new
FlatButton
(
child:
new
Text
(
'three'
),
onPressed:
()
=>
Navigator
.
push
(
args
.
context
,
new
ThreeRoute
())),
new
FlatButton
(
child:
new
Text
(
'three'
),
onPressed:
()
=>
Navigator
.
push
(
context
,
new
ThreeRoute
())),
])
),
};
...
...
packages/flutter/test/widget/modal_barrier_test.dart
View file @
9b9ad3db
...
...
@@ -61,9 +61,9 @@ void main() {
test
(
'ModalBarrier pops the Navigator when dismissed'
,
()
{
testWidgets
((
WidgetTester
tester
)
{
final
Map
<
String
,
RouteBuilder
>
routes
=
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
=>
new
FirstWidget
(),
'/modal'
:
(
RouteArguments
args
)
=>
new
SecondWidget
(),
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
=>
new
FirstWidget
(),
'/modal'
:
(
BuildContext
context
)
=>
new
SecondWidget
(),
};
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
routes
));
...
...
packages/flutter/test/widget/navigator_test.dart
View file @
9b9ad3db
...
...
@@ -66,9 +66,9 @@ class ThirdWidget extends StatelessWidget {
void
main
(
)
{
test
(
'Can navigator navigate to and from a stateful widget'
,
()
{
testWidgets
((
WidgetTester
tester
)
{
final
Map
<
String
,
RouteBuilder
>
routes
=
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
=>
new
FirstWidget
(),
'/second'
:
(
RouteArguments
args
)
=>
new
SecondWidget
(),
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
=>
new
FirstWidget
(),
'/second'
:
(
BuildContext
context
)
=>
new
SecondWidget
(),
};
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
routes
));
...
...
packages/flutter/test/widget/page_transitions_test.dart
View file @
9b9ad3db
...
...
@@ -18,7 +18,7 @@ void main() {
testWidgets
((
WidgetTester
tester
)
{
GlobalKey
containerKey1
=
new
GlobalKey
();
GlobalKey
containerKey2
=
new
GlobalKey
();
final
Map
<
String
,
RouteBuilder
>
routes
=
<
String
,
Route
Builder
>{
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
Widget
Builder
>{
'/'
:
(
_
)
=>
new
Container
(
key:
containerKey1
,
child:
new
Text
(
'Home'
)),
'/settings'
:
(
_
)
=>
new
Container
(
key:
containerKey2
,
child:
new
Text
(
'Settings'
)),
};
...
...
packages/flutter/test/widget/snack_bar_test.dart
View file @
9b9ad3db
...
...
@@ -12,8 +12,8 @@ void main() {
String
helloSnackBar
=
'Hello SnackBar'
;
Key
tapTarget
=
new
Key
(
'tap-target'
);
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Scaffold
(
body:
new
Builder
(
builder:
(
BuildContext
context
)
{
...
...
@@ -63,8 +63,8 @@ void main() {
int
snackBarCount
=
0
;
Key
tapTarget
=
new
Key
(
'tap-target'
);
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Scaffold
(
body:
new
Builder
(
builder:
(
BuildContext
context
)
{
...
...
@@ -146,8 +146,8 @@ void main() {
int
time
;
ScaffoldFeatureController
<
SnackBar
,
Null
>
lastController
;
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
{
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
{
return
new
Scaffold
(
body:
new
Builder
(
builder:
(
BuildContext
context
)
{
...
...
packages/flutter/test/widget/two_level_list_test.dart
View file @
9b9ad3db
...
...
@@ -13,7 +13,7 @@ void main() {
final
Key
sublistKey
=
new
UniqueKey
();
final
Key
bottomKey
=
new
UniqueKey
();
final
Map
<
String
,
RouteBuilder
>
routes
=
<
String
,
Route
Builder
>{
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
Widget
Builder
>{
'/'
:
(
_
)
{
return
new
Material
(
child:
new
Viewport
(
...
...
packages/flutter_markdown/example/demo.dart
View file @
9b9ad3db
...
...
@@ -29,8 +29,8 @@ Enjoy!
void
main
(
)
{
runApp
(
new
MaterialApp
(
title:
"Markdown Demo"
,
routes:
<
String
,
Route
Builder
>{
'/'
:
(
RouteArguments
args
)
=>
new
Scaffold
(
routes:
<
String
,
Widget
Builder
>{
'/'
:
(
BuildContext
context
)
=>
new
Scaffold
(
toolBar:
new
ToolBar
(
center:
new
Text
(
"Markdown Demo"
)),
body:
new
Markdown
(
data:
_kMarkdownData
)
)
...
...
packages/flutter_tools/templates/create/lib/main.dart.tmpl
View file @
9b9ad3db
...
...
@@ -12,8 +12,8 @@ void main() {
runApp(
new MaterialApp(
title: 'Flutter Demo',
routes: <String,
Route
Builder>{
'/': (
RouteArguments args
) => new FlutterDemo()
routes: <String,
Widget
Builder>{
'/': (
BuildContext context
) => new FlutterDemo()
}
)
);
...
...
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