ExplicitDriverBinding constructor
ExplicitDriverBinding({
- required AnimationController controller,
- required MotionEffect effect,
- required VoidCallback onTick,
Implementation
ExplicitDriverBinding({
required this.controller,
required this.effect,
required this.onTick,
}) {
_listener = () {
final elapsed = Duration(
microseconds:
(controller.value * effect.duration.inMicroseconds).round(),
);
effect.tick(elapsed);
onTick();
};
controller.addListener(_listener!);
}