applyResponseBreakpointEdit method

void applyResponseBreakpointEdit({
  1. required int requestId,
  2. required InfospectBreakpointEdit edit,
})

Records a response breakpoint original/edited pair on the logged call.

Implementation

void applyResponseBreakpointEdit({
  required int requestId,
  required InfospectBreakpointEdit edit,
}) {
  final int index = _selectCall(requestId);
  if (index == -1) return;

  final selected = _infospect.networkCallsSubject.value[index];
  _infospect.networkCallsSubject.value[index] = selected.copyWith(
    hadResponseBreakpoint: true,
    responseEditedAtBreakpoint: edit.hasChanges,
    responseBreakpointEdit: edit,
  );
  _infospect.networkCallsSubject
      .add([..._infospect.networkCallsSubject.value]);
}