tick method

void tick(
  1. double ms, {
  2. required bool playing,
})

A música está no instante ms, e playing diz se ela toca. Emite só se o estado mudar.

Implementation

void tick(double ms, {required bool playing}) {
  if (isClosed) return;
  final repeating = repeat.state;
  final started =
      state.started || playing || repeating != null || ms > _firstStartMs;
  final next = _reading(ms, started: started, repeating: repeating);
  if (next == state) return;
  emit(next);
}