getOutlierIndex method

int getOutlierIndex({
  1. required Rect bound,
})

Implementation

int getOutlierIndex({required Rect bound}) {
  int outlierIndex = -1;
  for (int index = 0; index < nodes.length; index++) {
    if (!bound.contains(nodes[index].position) ||
        !bound.contains(nodes[index].prev ?? Offset.zero) ||
        !bound.contains(nodes[index].next ?? Offset.zero)) {
      outlierIndex = index;
      break;
    }
  }
  return outlierIndex;
}