fromMap static method

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

Construct from Map.

Implementation

static ChatEventSlowModeDelayChanged? 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_slow_mode_delay = _map['old_slow_mode_delay']! as int;
  var new_slow_mode_delay = _map['new_slow_mode_delay']! as int;
  return ChatEventSlowModeDelayChanged(
    extra: extra,
    clientId: clientId,
    old_slow_mode_delay: old_slow_mode_delay,
    new_slow_mode_delay: new_slow_mode_delay,
  );
}