MorphController constructor

MorphController({
  1. required TickerProvider vsync,
  2. MorphMotion motion = .normal,
  3. VoidCallback? onHandoff,
})

Creates a standalone spring; onHandoff fires once per close, on the first zero crossing.

Implementation

MorphController({
  required TickerProvider vsync,
  MorphMotion motion = .normal,
  this.onHandoff,
}) : _userMotion = motion {
  assert(
    motion.debugContractViolation == null,
    motion.debugContractViolation ?? '',
  );
  _ticker = vsync.createTicker(_tick);
}