InputStoryContent.photo constructor

const InputStoryContent.photo({
  1. @JsonKey(name: 'type') @Default(StoryContentType.photo) StoryContentType type,
  2. @JsonKey(name: 'photo') @InputFileConverter() required InputFile photo,
})

Describes a photo to post as a story.

Implementation

const factory InputStoryContent.photo({
  /// Type of the content, always "photo"
  @JsonKey(name: 'type')
  @Default(StoryContentType.photo)
  final StoryContentType type,

  /// The photo to post as a story. The photo must be of the size 1080x1920 and
  /// must not exceed 10 MB.
  @JsonKey(name: 'photo') @InputFileConverter() required InputFile photo,
}) = InputStoryContentPhoto;