filter method Null safety

  1. @override
void filter(
  1. List<StackFrame> stackFrames,
  2. List<String?> reasons
)
override

Filters the list of StackFrames by updating corresponding indices in reasons.

To elide a frame or number of frames, set the string.

Implementation

@override
void filter(List<StackFrame> stackFrames, List<String?> reasons) {
  for (int index = 0; index < stackFrames.length - numFrames; index += 1) {
    if (_matchesFrames(stackFrames.skip(index).take(numFrames).toList())) {
      reasons.setRange(index, index + numFrames, _replacements);
      index += numFrames - 1;
    }
  }
}