getByPosition method

List<Subtitle?> getByPosition(
  1. Duration position
)

Implementation

List<Subtitle?> getByPosition(Duration position) {
  final found = subtitle.where((item) {
    if (item != null) return position >= item.start && position <= item.end;
    return false;
  }).toList();

  return found;
}