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
7055becf
Unverified
Commit
7055becf
authored
Feb 16, 2022
by
Mateus Felipe C. C. Pinto
Committed by
GitHub
Feb 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused parameter and consequently unused variable (#98428)
parent
cef68236
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
heroes.dart
packages/flutter/lib/src/widgets/heroes.dart
+4
-6
No files found.
packages/flutter/lib/src/widgets/heroes.dart
View file @
7055becf
...
@@ -851,17 +851,16 @@ class HeroController extends NavigatorObserver {
...
@@ -851,17 +851,16 @@ class HeroController extends NavigatorObserver {
if
(
toRoute
!=
fromRoute
&&
toRoute
is
PageRoute
<
dynamic
>
&&
fromRoute
is
PageRoute
<
dynamic
>)
{
if
(
toRoute
!=
fromRoute
&&
toRoute
is
PageRoute
<
dynamic
>
&&
fromRoute
is
PageRoute
<
dynamic
>)
{
final
PageRoute
<
dynamic
>
from
=
fromRoute
;
final
PageRoute
<
dynamic
>
from
=
fromRoute
;
final
PageRoute
<
dynamic
>
to
=
toRoute
;
final
PageRoute
<
dynamic
>
to
=
toRoute
;
final
Animation
<
double
>
animation
=
(
flightType
==
HeroFlightDirection
.
push
)
?
to
.
animation
!
:
from
.
animation
!;
// A user gesture may have already completed the pop, or we might be the initial route
// A user gesture may have already completed the pop, or we might be the initial route
switch
(
flightType
)
{
switch
(
flightType
)
{
case
HeroFlightDirection
.
pop
:
case
HeroFlightDirection
.
pop
:
if
(
animation
.
value
==
0.0
)
{
if
(
from
.
animation
!
.
value
==
0.0
)
{
return
;
return
;
}
}
break
;
break
;
case
HeroFlightDirection
.
push
:
case
HeroFlightDirection
.
push
:
if
(
animation
.
value
==
1.0
)
{
if
(
to
.
animation
!
.
value
==
1.0
)
{
return
;
return
;
}
}
break
;
break
;
...
@@ -871,7 +870,7 @@ class HeroController extends NavigatorObserver {
...
@@ -871,7 +870,7 @@ class HeroController extends NavigatorObserver {
// maintainState = true, then the hero's final dimensions can be measured
// maintainState = true, then the hero's final dimensions can be measured
// immediately because their page's layout is still valid.
// immediately because their page's layout is still valid.
if
(
isUserGestureTransition
&&
flightType
==
HeroFlightDirection
.
pop
&&
to
.
maintainState
)
{
if
(
isUserGestureTransition
&&
flightType
==
HeroFlightDirection
.
pop
&&
to
.
maintainState
)
{
_startHeroTransition
(
from
,
to
,
animation
,
flightType
,
isUserGestureTransition
);
_startHeroTransition
(
from
,
to
,
flightType
,
isUserGestureTransition
);
}
else
{
}
else
{
// Otherwise, delay measuring until the end of the next frame to allow
// Otherwise, delay measuring until the end of the next frame to allow
// the 'to' route to build and layout.
// the 'to' route to build and layout.
...
@@ -882,7 +881,7 @@ class HeroController extends NavigatorObserver {
...
@@ -882,7 +881,7 @@ class HeroController extends NavigatorObserver {
to
.
offstage
=
to
.
animation
!.
value
==
0.0
;
to
.
offstage
=
to
.
animation
!.
value
==
0.0
;
WidgetsBinding
.
instance
.
addPostFrameCallback
((
Duration
value
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
Duration
value
)
{
_startHeroTransition
(
from
,
to
,
animation
,
flightType
,
isUserGestureTransition
);
_startHeroTransition
(
from
,
to
,
flightType
,
isUserGestureTransition
);
});
});
}
}
}
}
...
@@ -893,7 +892,6 @@ class HeroController extends NavigatorObserver {
...
@@ -893,7 +892,6 @@ class HeroController extends NavigatorObserver {
void
_startHeroTransition
(
void
_startHeroTransition
(
PageRoute
<
dynamic
>
from
,
PageRoute
<
dynamic
>
from
,
PageRoute
<
dynamic
>
to
,
PageRoute
<
dynamic
>
to
,
Animation
<
double
>
animation
,
HeroFlightDirection
flightType
,
HeroFlightDirection
flightType
,
bool
isUserGestureTransition
,
bool
isUserGestureTransition
,
)
{
)
{
...
...
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