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(((json['reactions']
                as List<dynamic>?) ??
            <dynamic>[])
        .map((item) => ReactionType.fromJson(item as Map<String, dynamic>?))
        .toList()),
    maxReactionCount: (json['max_reaction_count'] as int?) ?? 0,
  );
}