TopologySelectorLabelRequirement.fromJson constructor

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

Creates a TopologySelectorLabelRequirement from JSON data.

Implementation

factory TopologySelectorLabelRequirement.fromJson(Map<String, dynamic> json) {
  final tempKeyJson = json['key'];
  final tempValuesJson = json['values'];

  final String tempKey = tempKeyJson;
  final List<String> tempValues = List<String>.from(tempValuesJson);

  return TopologySelectorLabelRequirement(
    key: tempKey,
    values: tempValues,
  );
}