fromJson static method

StickerFullTypeCustomEmoji? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static StickerFullTypeCustomEmoji? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return StickerFullTypeCustomEmoji(
    customEmojiId: (json['custom_emoji_id'] is int
            ? json['custom_emoji_id'] as int
            : int.tryParse(json['custom_emoji_id']?.toString() ?? '')) ??
        0,
    needsRepainting: (json['needs_repainting'] as bool?) ?? false,
  );
}