fromJson static method

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

Implementation

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

  return ChatPhotoStickerTypeRegularOrMask(
    stickerSetId: (json['sticker_set_id'] is int
            ? json['sticker_set_id'] as int
            : int.tryParse(json['sticker_set_id']?.toString() ?? '')) ??
        0,
    stickerId: (json['sticker_id'] is int
            ? json['sticker_id'] as int
            : int.tryParse(json['sticker_id']?.toString() ?? '')) ??
        0,
  );
}