fromMap static method

ChatEventAvailableReactionsChanged? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static ChatEventAvailableReactionsChanged? fromMap(
    Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var old_available_reactions =
      ChatAvailableReactions.fromMap(_map['old_available_reactions'])!;
  var new_available_reactions =
      ChatAvailableReactions.fromMap(_map['new_available_reactions'])!;
  return ChatEventAvailableReactionsChanged(
    extra: extra,
    clientId: clientId,
    old_available_reactions: old_available_reactions,
    new_available_reactions: new_available_reactions,
  );
}