fromJson static method

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

Implementation

static AvailableReaction? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return AvailableReaction(
    type: ReactionType.fromJson(tdMapFromJson(json['type'])),
    needsPremium: (json['needs_premium'] as bool?) ?? false,
  );
}