fromJson static method

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

Implementation

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

  return GroupCallMessageLevel(
    minStarCount: (json['min_star_count'] as int?) ?? 0,
    pinDuration: (json['pin_duration'] as int?) ?? 0,
    maxTextLength: (json['max_text_length'] as int?) ?? 0,
    maxCustomEmojiCount: (json['max_custom_emoji_count'] as int?) ?? 0,
    firstColor: (json['first_color'] as int?) ?? 0,
    secondColor: (json['second_color'] as int?) ?? 0,
    backgroundColor: (json['background_color'] as int?) ?? 0,
  );
}