InfospectBreakpointCondition.fromMap constructor

InfospectBreakpointCondition.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory InfospectBreakpointCondition.fromMap(Map<String, dynamic> map) {
  return InfospectBreakpointCondition(
    id: map['id'] as String? ?? 'cond_${map.hashCode}',
    target: InfospectBreakpointMatchTarget.values.firstWhere(
      (e) => e.name == map['target'],
      orElse: () => InfospectBreakpointMatchTarget.requestBodyText,
    ),
    op: InfospectBreakpointMatchOp.values.firstWhere(
      (e) => e.name == map['op'],
      orElse: () => InfospectBreakpointMatchOp.contains,
    ),
    key: map['key'] as String?,
    value: map['value'] as String?,
  );
}