fromMap static method
override
Construct from Map.
Implementation
static Photo? 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 has_stickers = _map['has_stickers']! as bool;
var minithumbnail = Minithumbnail.fromMap(_map['minithumbnail']);
var sizes = List<PhotoSize>.from(
(_map["sizes"] ?? []).map(
(e) => PhotoSize.fromMap(e),
),
);
return Photo(
extra: extra,
clientId: clientId,
has_stickers: has_stickers,
minithumbnail: minithumbnail,
sizes: sizes,
);
}