goBack method

void goBack()

Implementation

void goBack() {
  widget.controller?.play();

  animationController!.stop();

  if (this.lastShowing == null) {
    widget.storyItems.last!.shown = false;
  }

  if (this.lastShowing == widget.storyItems.first) {
    beginPlay();
  } else {
    this.lastShowing!.shown = false;
    int lastPos = widget.storyItems.indexOf(this.lastShowing);
    final previous = widget.storyItems[lastPos - 1]!;

    previous.shown = false;

    beginPlay();
  }
}