fromMap static method

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

Construct from Map.

Implementation

static ChatPhotoInfo? 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 small = File.fromMap(_map['small'])!;
  var big = File.fromMap(_map['big'])!;
  var minithumbnail = Minithumbnail.fromMap(_map['minithumbnail']);
  var has_animation = _map['has_animation']! as bool;
  var is_personal = _map['is_personal']! as bool;
  return ChatPhotoInfo(
    extra: extra,
    clientId: clientId,
    small: small,
    big: big,
    minithumbnail: minithumbnail,
    has_animation: has_animation,
    is_personal: is_personal,
  );
}