deserialize static method

ByValueKey deserialize(
  1. Map<String, String> json
)

Deserializes the finder from JSON generated by serialize.

Implementation

static ByValueKey deserialize(Map<String, String> json) {
  final String keyValueString = json['keyValueString']!;
  return switch (json['keyValueType']!) {
    'int'    => ByValueKey(int.parse(keyValueString)),
    'String' => ByValueKey(keyValueString),
    final String keyValueType => throw _createInvalidKeyValueTypeError(keyValueType),
  };
}