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
f0620f47
Unverified
Commit
f0620f47
authored
Jan 15, 2019
by
Dan Field
Committed by
GitHub
Jan 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add type parameter back to PageRouteFactory (#26559)
parent
774e8c18
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
12 deletions
+6
-12
app.dart
packages/flutter/lib/src/cupertino/app.dart
+2
-4
app.dart
packages/flutter/lib/src/material/app.dart
+2
-4
app.dart
packages/flutter/lib/src/widgets/app.dart
+2
-4
No files found.
packages/flutter/lib/src/cupertino/app.dart
View file @
f0620f47
...
@@ -274,10 +274,8 @@ class _CupertinoAppState extends State<CupertinoApp> {
...
@@ -274,10 +274,8 @@ class _CupertinoAppState extends State<CupertinoApp> {
key:
GlobalObjectKey
(
this
),
key:
GlobalObjectKey
(
this
),
navigatorKey:
widget
.
navigatorKey
,
navigatorKey:
widget
.
navigatorKey
,
navigatorObservers:
_navigatorObservers
,
navigatorObservers:
_navigatorObservers
,
// TODO(dnfield): when https://github.com/dart-lang/sdk/issues/34572 is resolved
pageRouteBuilder:
<
T
>(
RouteSettings
settings
,
WidgetBuilder
builder
)
=>
// this can use type arguments again
CupertinoPageRoute
<
T
>(
settings:
settings
,
builder:
builder
),
pageRouteBuilder:
(
RouteSettings
settings
,
WidgetBuilder
builder
)
=>
CupertinoPageRoute
<
dynamic
>(
settings:
settings
,
builder:
builder
),
home:
widget
.
home
,
home:
widget
.
home
,
routes:
widget
.
routes
,
routes:
widget
.
routes
,
initialRoute:
widget
.
initialRoute
,
initialRoute:
widget
.
initialRoute
,
...
...
packages/flutter/lib/src/material/app.dart
View file @
f0620f47
...
@@ -411,10 +411,8 @@ class _MaterialAppState extends State<MaterialApp> {
...
@@ -411,10 +411,8 @@ class _MaterialAppState extends State<MaterialApp> {
key:
GlobalObjectKey
(
this
),
key:
GlobalObjectKey
(
this
),
navigatorKey:
widget
.
navigatorKey
,
navigatorKey:
widget
.
navigatorKey
,
navigatorObservers:
_navigatorObservers
,
navigatorObservers:
_navigatorObservers
,
// TODO(dnfield): when https://github.com/dart-lang/sdk/issues/34572 is resolved
pageRouteBuilder:
<
T
>(
RouteSettings
settings
,
WidgetBuilder
builder
)
=>
// this can use type arguments again
MaterialPageRoute
<
T
>(
settings:
settings
,
builder:
builder
),
pageRouteBuilder:
(
RouteSettings
settings
,
WidgetBuilder
builder
)
=>
MaterialPageRoute
<
dynamic
>(
settings:
settings
,
builder:
builder
),
home:
widget
.
home
,
home:
widget
.
home
,
routes:
widget
.
routes
,
routes:
widget
.
routes
,
initialRoute:
widget
.
initialRoute
,
initialRoute:
widget
.
initialRoute
,
...
...
packages/flutter/lib/src/widgets/app.dart
View file @
f0620f47
...
@@ -83,9 +83,7 @@ typedef GenerateAppTitle = String Function(BuildContext context);
...
@@ -83,9 +83,7 @@ typedef GenerateAppTitle = String Function(BuildContext context);
/// The signature of [WidgetsApp.pageRouteBuilder].
/// The signature of [WidgetsApp.pageRouteBuilder].
///
///
/// Creates a [PageRoute] using the given [RouteSettings] and [WidgetBuilder].
/// Creates a [PageRoute] using the given [RouteSettings] and [WidgetBuilder].
// TODO(dnfield): when https://github.com/dart-lang/sdk/issues/34572 is resolved
typedef
PageRouteFactory
=
PageRoute
<
T
>
Function
<
T
>(
RouteSettings
settings
,
WidgetBuilder
builder
);
// this can use type arguments again
typedef
PageRouteFactory
=
PageRoute
<
dynamic
>
Function
(
RouteSettings
settings
,
WidgetBuilder
builder
);
/// A convenience class that wraps a number of widgets that are commonly
/// A convenience class that wraps a number of widgets that are commonly
/// required for an application.
/// required for an application.
...
@@ -754,7 +752,7 @@ class _WidgetsAppState extends State<WidgetsApp> implements WidgetsBindingObserv
...
@@ -754,7 +752,7 @@ class _WidgetsAppState extends State<WidgetsApp> implements WidgetsBindingObserv
assert
(
widget
.
pageRouteBuilder
!=
null
,
assert
(
widget
.
pageRouteBuilder
!=
null
,
'The default onGenerateRoute handler for WidgetsApp must have a '
'The default onGenerateRoute handler for WidgetsApp must have a '
'pageRouteBuilder set if the home or routes properties are set.'
);
'pageRouteBuilder set if the home or routes properties are set.'
);
final
Route
<
dynamic
>
route
=
widget
.
pageRouteBuilder
(
final
Route
<
dynamic
>
route
=
widget
.
pageRouteBuilder
<
dynamic
>
(
settings
,
settings
,
pageContentBuilder
,
pageContentBuilder
,
);
);
...
...
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