fromJson static method
Implementation
static InputAnimation? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return InputAnimation(
animation:
InputFile.fromJson(json['animation'] as Map<String, dynamic>?)!,
thumbnail:
InputThumbnail.fromJson(json['thumbnail'] as Map<String, dynamic>?),
addedStickerFileIds: List<int>.from(
((json['added_sticker_file_ids'] as List<dynamic>?) ?? <dynamic>[])
.map((item) =>
(item is int ? item : int.tryParse(item.toString()) ?? 0))
.toList()),
duration: (json['duration'] as int?) ?? 0,
width: (json['width'] as int?) ?? 0,
height: (json['height'] as int?) ?? 0,
);
}