fromJson static method

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

Implementation

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

  return InputStoryContentPhoto(
    photo: InputFile.fromJson(json['photo'] 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()),
  );
}