deserialize method Null safety
Deserializes the finder from JSON generated by serialize.
Implementation
static ByValueKey deserialize(Map<String, String> json) {
final String keyValueString = json['keyValueString']!;
final String keyValueType = json['keyValueType']!;
switch (keyValueType) {
case 'int':
return ByValueKey(int.parse(keyValueString));
case 'String':
return ByValueKey(keyValueString);
default:
throw _createInvalidKeyValueTypeError(keyValueType);
}
}