fromJson static method
Implementation
static ProfilePhoto? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return ProfilePhoto(
id: (json['id'] is int
? json['id'] as int
: int.tryParse(json['id']?.toString() ?? '')) ??
0,
small: File.fromJson(json['small'] as Map<String, dynamic>?)!,
big: File.fromJson(json['big'] as Map<String, dynamic>?)!,
minithumbnail: Minithumbnail.fromJson(
json['minithumbnail'] as Map<String, dynamic>?),
hasAnimation: (json['has_animation'] as bool?) ?? false,
isPersonal: (json['is_personal'] as bool?) ?? false,
);
}