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
324f2759
Unverified
Commit
324f2759
authored
Dec 18, 2018
by
Hans Muller
Committed by
GitHub
Dec 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TransitionRoute.canTransitionFrom,To() doc update (#25477)
parent
f6c1476f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
2 deletions
+41
-2
routes.dart
packages/flutter/lib/src/widgets/routes.dart
+41
-2
No files found.
packages/flutter/lib/src/widgets/routes.dart
View file @
324f2759
...
...
@@ -257,16 +257,55 @@ abstract class TransitionRoute<T> extends OverlayRoute<T> {
}
}
/// Whether this route can perform a transition to the given route.
/// Returns true if this route supports a transition animation that runs
/// when [nextRoute] is pushed on top of it or when [nextRoute] is popped
/// off of it.
///
/// Subclasses can override this method to restrict the set of routes they
/// need to coordinate transitions with.
///
/// If true, and `nextRoute.canTransitionFrom()` is true, then the
/// [buildTransitions] `secondaryAnimation` will run from 0.0 - 1.0
/// when [nextRoute] is pushed on top of this one. Similarly, if
/// the [nextRoute] is popped off of this route, the
/// `secondaryAnimation` will run from 1.0 - 0.0.
///
/// If false, this route's [buildTransitions] `secondaryAnimation` parameter
/// value will be [kAlwaysDismissedAnimation]. In other words, this route
/// will not animate when when [nextRoute] is pushed on top of it or when
/// [nextRoute] is popped off of it.
///
/// Returns true by default.
///
/// See also:
///
/// * [canTransitionFrom], which must be true for [nextRoute] for the
/// [buildTransitions] `secondaryAnimation` to run.
bool
canTransitionTo
(
TransitionRoute
<
dynamic
>
nextRoute
)
=>
true
;
/// Whether this route can perform a transition from the given route.
/// Returns true if [previousRoute] should animate when this route
/// is pushed on top of it or when then this route is popped off of it.
///
/// Subclasses can override this method to restrict the set of routes they
/// need to coordinate transitions with.
///
/// If true, and `previousRoute.canTransitionTo()` is true, then the
/// previous route's [buildTransitions] `secondaryAnimation` will
/// run from 0.0 - 1.0 when this route is pushed on top of
/// it. Similarly, if this route is popped off of [previousRoute]
/// the previous route's `secondaryAnimation` will run from 1.0 - 0.0.
///
/// If false, then the previous route's [buildTransitions]
/// `secondaryAnimation` value will be kAlwaysDismissedAnimation. In
/// other words [previousRoute] will not animate when this route is
/// pushed on top of it or when then this route is popped off of it.
///
/// Returns true by default.
///
/// See also:
///
/// * [canTransitionTo], which must be true for [previousRoute] for its
/// [buildTransitions] `secondaryAnimation` to run.
bool
canTransitionFrom
(
TransitionRoute
<
dynamic
>
previousRoute
)
=>
true
;
@override
...
...
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