direction property Null safety

int direction

Returns the animation's play direction: 1 for forwards, -1 for backwards

Implementation

int get direction => _direction;
void direction=(int value)

Direction should only be +1 or -1

Implementation

set direction(int value) => _direction = value == -1 ? -1 : 1;