onCueUpdate method

  1. @override
void onCueUpdate(
  1. int textTrackUid,
  2. int cueUid,
  3. double endTime,
  4. String content,
)
override

Implementation

@override
void onCueUpdate(int textTrackUid, int cueUid, double endTime, String content) {
  TextTrack? textTrack = _textTracks.firstWhereOrNull((element) => element.uid == textTrackUid);
  CueImpl? cue = textTrack?.cues.firstWhereOrNull((element) => element.uid == cueUid) as CueImpl?;
  if (cue == null) {
    return;
  }

  cue.update(endTime, content);
  cue.dispatchEvent(CueUpdateEvent(cue: cue));
}