fromJson method

  1. @override
USearchPostsSort fromJson(
  1. String json
)

Implementation

@override
USearchPostsSort fromJson(String json) {
  final knownValue = KnownSearchPostsSort.valueOf(json);

  return knownValue != null
      ? USearchPostsSort.knownValue(data: knownValue)
      : USearchPostsSort.unknownValue(data: json);
}