findSegmentByUri method

HlsSegment? findSegmentByUri(
  1. Uri uri
)

Finds a segment in the segment list by its uri.

Returns the HlsSegment if found, otherwise null.

Implementation

HlsSegment? findSegmentByUri(Uri uri) {
  return _list.where((task) => task.url == uri.toString()).firstOrNull;
}