VoidFunction typedef Null safety

VoidFunction = void Function()

The Translation class animates a value by continuously calling the onUpdate function.

Use one of the predefined Transition functions to control the progress of the animation (linear, easeInQuadratic, easeInCubic, ...). If none of the predefined Transition functions fulfills your needs you can also define your own function (see TransitionFunction).


var translation = new Translation(0.0, 100.0, 1.0, Transition.linear);
translation.onUpdate = (value) => print('the value changed to $value');

var transition = Transition.easeInOutQuadratic;
stage.juggler.addTranslation(0.0, 100.0, 1.0, transition, (v) {
  print('the value changed to $v'));


typedef VoidFunction = void Function();