@@ -8,61 +8,15 @@ export 'animate.dart';
88export 'animate_list.dart' ;
99export 'adapters/adapters.dart' ;
1010export 'effects/effects.dart' ;
11-
11+ export 'effect_entry.dart' ;
1212export 'extensions/extensions.dart' ;
1313
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-
6014/// Builds a sub-animation to the provided controller that runs from start to
6115/// end, with the provided curve. For example, it could create an animation that
6216/// runs from 300ms to 800ms with an easeOut curve, within a controller that has a
6317/// total duration of 1000ms.
6418///
65- /// Mostly used by [EffectEntry] and [BeginEndEffect ] classes.
19+ /// Mostly used by [EffectEntry] and [Effect ] classes.
6620Animation <double > buildSubAnimation (
6721 AnimationController controller,
6822 Duration begin,
0 commit comments