TargetGroupPairInfo.fromJson constructor

TargetGroupPairInfo.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory TargetGroupPairInfo.fromJson(Map<String, dynamic> json) {
  return TargetGroupPairInfo(
    prodTrafficRoute: json['prodTrafficRoute'] != null
        ? TrafficRoute.fromJson(
            json['prodTrafficRoute'] as Map<String, dynamic>)
        : null,
    targetGroups: (json['targetGroups'] as List?)
        ?.whereNotNull()
        .map((e) => TargetGroupInfo.fromJson(e as Map<String, dynamic>))
        .toList(),
    testTrafficRoute: json['testTrafficRoute'] != null
        ? TrafficRoute.fromJson(
            json['testTrafficRoute'] as Map<String, dynamic>)
        : null,
  );
}