ReactionType.fromJson constructor

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

a ReactionType return type can be :

Implementation

factory ReactionType.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case ReactionTypeEmoji.CONSTRUCTOR:
      return ReactionTypeEmoji.fromJson(json);
    case ReactionTypeCustomEmoji.CONSTRUCTOR:
      return ReactionTypeCustomEmoji.fromJson(json);
    default:
      return const ReactionType();
  }
}