getPartByTime method

ClosedCaptionPart? getPartByTime(
  1. Duration offset
)

Gets the caption part displayed at the specified point in time, relative to this caption's offset. Returns null if not found. Note that some captions may not have any parts at all.

Implementation

ClosedCaptionPart? getPartByTime(Duration offset) =>
    parts.firstWhereOrNull((e) => e.offset >= offset);