OptionValue.fromJson constructor

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

Parses whichever OptionValue subtype the JSON describes.

Implementation

factory OptionValue.fromJson(Map<String, dynamic> json) {
  final object = tdObjectFactories[json['@type']]?.call(json);
  return object is OptionValue ? object : UndecodedOptionValue(json);
}