onVideoController method

void onVideoController()

Implementation

void onVideoController() {
  if (_controller == null) return;
  if (!_controller!.value.isPlaying) {
    playButtonModel.icon = Icons.pause;
    playButtonModel.size = 65;
    if (_controller!.value.position == _controller!.value.duration) seek(0);
  } else {
    playButtonModel.icon = Icons.play_arrow;
    playButtonModel.size = 65;
  }
  _controller!.setLooping(widget.model.loop);
}