@@ -8,61 +8,15 @@ export 'animate.dart';
8
8
export 'animate_list.dart' ;
9
9
export 'adapters/adapters.dart' ;
10
10
export 'effects/effects.dart' ;
11
-
11
+ export 'effect_entry.dart' ;
12
12
export 'extensions/extensions.dart' ;
13
13
14
- /// Because [BeginEndEffect] classes are immutable and may be reused between multiple
15
- /// [Animate] (or [AnimateList] ) instances, an `EffectEntry` is created to store
16
- /// values that may be different between instances. For example, due to
17
- /// `AnimateList interval` , or from inheriting values from prior effects in the chain.
18
- @immutable
19
- class EffectEntry {
20
- const EffectEntry ({
21
- required this .effect,
22
- required this .delay,
23
- required this .duration,
24
- required this .curve,
25
- required this .owner,
26
- });
27
-
28
- /// The delay for this entry.
29
- final Duration delay;
30
-
31
- /// The duration for this entry.
32
- final Duration duration;
33
-
34
- /// The curve used by this entry.
35
- final Curve curve;
36
-
37
- /// The effect associated with this entry.
38
- final Effect effect;
39
-
40
- /// The [Animate] instance that created this entry. This can be used by effects
41
- /// to read information about the animation. Effects _should not_ modify
42
- /// the animation (ex. by calling [Animate.addEffect] ).
43
- final Animate owner;
44
-
45
- /// The begin time for this entry.
46
- Duration get begin => delay;
47
-
48
- /// The end time for this entry.
49
- Duration get end => delay + duration;
50
-
51
- /// Builds a sub-animation based on the properties of this entry.
52
- Animation <double > buildAnimation (
53
- AnimationController controller, {
54
- Curve ? curve,
55
- }) {
56
- return buildSubAnimation (controller, begin, end, curve ?? this .curve);
57
- }
58
- }
59
-
60
14
/// Builds a sub-animation to the provided controller that runs from start to
61
15
/// end, with the provided curve. For example, it could create an animation that
62
16
/// runs from 300ms to 800ms with an easeOut curve, within a controller that has a
63
17
/// total duration of 1000ms.
64
18
///
65
- /// Mostly used by [EffectEntry] and [BeginEndEffect ] classes.
19
+ /// Mostly used by [EffectEntry] and [Effect ] classes.
66
20
Animation <double > buildSubAnimation (
67
21
AnimationController controller,
68
22
Duration begin,
0 commit comments