removeSegment method

void removeSegment(
  1. int start,
  2. int end
)

Implementation

void removeSegment(int start, int end) {
  segments.removeWhere(
      (element) => element.start == start && element.endIndex == end);
}