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
aa9f6a2a
Unverified
Commit
aa9f6a2a
authored
Apr 17, 2021
by
Amine Dakhli
Committed by
GitHub
Apr 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace dynamic by Object/Object? in router.dart (#80476)
parent
aa7ab108
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
router.dart
packages/flutter/lib/src/widgets/router.dart
+7
-7
No files found.
packages/flutter/lib/src/widgets/router.dart
View file @
aa9f6a2a
...
...
@@ -306,7 +306,7 @@ class Router<T> extends StatefulWidget {
///
/// * [maybeOf], which is a similar function, but it will return null instead
/// of throwing an exception if no [Router] ancestor exists.
static
Router
<
dynamic
>
of
(
BuildContext
context
)
{
static
Router
<
T
>
of
<
T
extends
Object
?>
(
BuildContext
context
)
{
final
_RouterScope
?
scope
=
context
.
dependOnInheritedWidgetOfExactType
<
_RouterScope
>();
assert
(()
{
if
(
scope
==
null
)
{
...
...
@@ -318,7 +318,7 @@ class Router<T> extends StatefulWidget {
}
return
true
;
}());
return
scope
!.
routerState
.
widget
;
return
scope
!.
routerState
.
widget
as
Router
<
T
>
;
}
/// Retrieves the immediate [Router] ancestor from the given context.
...
...
@@ -334,9 +334,9 @@ class Router<T> extends StatefulWidget {
///
/// * [of], a similar method that returns a non-nullable value, and will
/// throw if no [Router] ancestor exists.
static
Router
<
dynamic
>?
maybeOf
(
BuildContext
context
)
{
static
Router
<
T
>?
maybeOf
<
T
extends
Object
?>
(
BuildContext
context
)
{
final
_RouterScope
?
scope
=
context
.
dependOnInheritedWidgetOfExactType
<
_RouterScope
>();
return
scope
?.
routerState
.
widget
;
return
scope
?.
routerState
.
widget
as
Router
<
T
>?
;
}
/// Forces the [Router] to run the [callback] and reports the route
...
...
@@ -704,9 +704,9 @@ class _RouterScope extends InheritedWidget {
final
ValueListenable
<
RouteInformation
?>?
routeInformationProvider
;
final
BackButtonDispatcher
?
backButtonDispatcher
;
final
RouteInformationParser
<
dynamic
>?
routeInformationParser
;
final
RouterDelegate
<
dynamic
>
routerDelegate
;
final
_RouterState
<
dynamic
>
routerState
;
final
RouteInformationParser
<
Object
?
>?
routeInformationParser
;
final
RouterDelegate
<
Object
?
>
routerDelegate
;
final
_RouterState
<
Object
?
>
routerState
;
@override
bool
updateShouldNotify
(
_RouterScope
oldWidget
)
{
...
...
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