fromJson static method

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

Implementation

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

  return ChatAvailableReactionsSome(
    reactions: List<ReactionType>.from(
      tdListFromJson(json['reactions'])
          .map((item) => ReactionType.fromJson(tdMapFromJson(item)))
          .whereType<ReactionType>(),
    ),
    maxReactionCount: (json['max_reaction_count'] as int?) ?? 0,
  );
}