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
77bbd28c
Unverified
Commit
77bbd28c
authored
Apr 04, 2019
by
Michael Goderbauer
Committed by
GitHub
Apr 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Random trivial fixes in the animation packages (#30276)
parent
3c8dabef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
23 deletions
+20
-23
animation_controller.dart
packages/flutter/lib/src/animation/animation_controller.dart
+4
-5
curves.dart
packages/flutter/lib/src/animation/curves.dart
+2
-2
tween_sequence.dart
packages/flutter/lib/src/animation/tween_sequence.dart
+14
-16
No files found.
packages/flutter/lib/src/animation/animation_controller.dart
View file @
77bbd28c
...
...
@@ -44,7 +44,7 @@ const Tolerance _kFlingTolerance = Tolerance(
/// Configures how an [AnimationController] behaves when animations are disabled.
///
/// When [AccessibilityFeatures.disableAnimations] is true, the device is asking
///
f
lutter to reduce or disable animations as much as possible. To honor this,
///
F
lutter to reduce or disable animations as much as possible. To honor this,
/// we reduce the duration and the corresponding number of frames for animations.
/// This enum is used to allow certain [AnimationController]s to opt out of this
/// behavior.
...
...
@@ -209,7 +209,7 @@ class AnimationController extends Animation<double>
with
AnimationEagerListenerMixin
,
AnimationLocalListenersMixin
,
AnimationLocalStatusListenersMixin
{
/// Creates an animation controller.
///
/// *
[value]
is the initial value of the animation. If defaults to the lower
/// *
`value`
is the initial value of the animation. If defaults to the lower
/// bound.
///
/// * [duration] is the length of time this animation should last.
...
...
@@ -524,11 +524,10 @@ class AnimationController extends Animation<double>
return
_animateToInternal
(
target
,
duration:
duration
,
curve:
curve
);
}
TickerFuture
_animateToInternal
(
double
target
,
{
Duration
duration
,
Curve
curve
=
Curves
.
linear
,
AnimationBehavior
animationBehavior
})
{
final
AnimationBehavior
behavior
=
animationBehavior
??
this
.
animationBehavior
;
TickerFuture
_animateToInternal
(
double
target
,
{
Duration
duration
,
Curve
curve
=
Curves
.
linear
})
{
double
scale
=
1.0
;
if
(
SemanticsBinding
.
instance
.
disableAnimations
)
{
switch
(
b
ehavior
)
{
switch
(
animationB
ehavior
)
{
case
AnimationBehavior
.
normal
:
// Since the framework cannot handle zero duration animations, we run it at 5% of the normal
// duration to limit most animations to a single frame.
...
...
packages/flutter/lib/src/animation/curves.dart
View file @
77bbd28c
...
...
@@ -111,8 +111,8 @@ class SawTooth extends Curve {
}
}
/// A curve that is 0.0 until [begin], then curved (according to [curve] from
/// 0.0
to 1.0 at [end], then 1.0
.
/// A curve that is 0.0 until [begin], then curved (according to [curve]
)
from
/// 0.0
at [begin] to 1.0 at [end], then remains 1.0 past [end]
.
///
/// An [Interval] can be used to delay an animation. For example, a six second
/// animation that uses an [Interval] with its [begin] set to 0.5 and its [end]
...
...
packages/flutter/lib/src/animation/tween_sequence.dart
View file @
77bbd28c
...
...
@@ -7,17 +7,16 @@ import 'package:flutter/foundation.dart';
import
'animation.dart'
;
import
'tween.dart'
;
/// Enables creating an [Animation] whose value is defined by a
///
sequence of
[Tween]s.
/// Enables creating an [Animation] whose value is defined by a
sequence of
/// [Tween]s.
///
/// Each [TweenSequenceItem] has a weight that defines its percentage
///
of the animation's duration. Each tween defines the animation's valu
e
///
during the
interval indicated by its weight.
/// Each [TweenSequenceItem] has a weight that defines its percentage
of the
///
animation's duration. Each tween defines the animation's value during th
e
/// interval indicated by its weight.
///
/// For example, to define an animation that uses an easing curve to
/// interpolate between 5.0 and 10.0 during the first 40% of the
/// animation, remain at 10.0 for the next 20%, and then return to
/// 10.0 for the final 40%:
/// For example, to define an animation that uses an easing curve to interpolate
/// between 5.0 and 10.0 during the first 40% of the animation, remain at 10.0
/// for the next 20%, and then return to 10.0 for the final 40%:
///
/// ```dart
/// final Animation<double> animation = TweenSequence(
...
...
@@ -42,12 +41,11 @@ import 'tween.dart';
class
TweenSequence
<
T
>
extends
Animatable
<
T
>
{
/// Construct a TweenSequence.
///
/// The [items] parameter must be a list of one or more
/// [TweenSequenceItem]s.
/// The [items] parameter must be a list of one or more [TweenSequenceItem]s.
///
/// There's a small cost associated with building a `TweenSequence` so
///
it's best to reuse one, rather than rebuilding it on every frame,
///
when that's
possible.
/// There's a small cost associated with building a `TweenSequence` so
it's
///
best to reuse one, rather than rebuilding it on every frame, when that's
/// possible.
TweenSequence
(
List
<
TweenSequenceItem
<
T
>>
items
)
:
assert
(
items
!=
null
),
assert
(
items
.
isNotEmpty
)
{
...
...
@@ -124,8 +122,8 @@ class TweenSequenceItem<T> {
/// An arbitrary value that indicates the relative percentage of a
/// [TweenSequence] animation's duration when [tween] will be used.
///
/// The percentage for an individual item is the item's weight divided
///
by the
sum of all of the items' weights.
/// The percentage for an individual item is the item's weight divided
by the
/// sum of all of the items' weights.
final
double
weight
;
}
...
...
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