Game constructor
const
Game({
- @JsonKey(name: 'title') required String title,
- @JsonKey(name: 'description') required String description,
- @JsonKey(name: 'photo') required List<
PhotoSize> photo, - @JsonKey(name: 'text') String? text,
- @JsonKey(name: 'text_entities') List<
MessageEntity> ? textEntities, - @JsonKey(name: 'animation') Animation? animation,
Constructs a Game object.
Implementation
const factory Game({
/// Title of the game
@JsonKey(name: 'title') required String title,
/// Description of the game
@JsonKey(name: 'description') required String description,
/// Photo that will be displayed in the game message in chats.
@JsonKey(name: 'photo') required List<PhotoSize> photo,
/// Optional. Brief description of the game or high scores included in the game message.
@JsonKey(name: 'text') String? text,
/// Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
@JsonKey(name: 'text_entities') List<MessageEntity>? textEntities,
/// Optional. Animation that will be displayed in the game message in chats.
@JsonKey(name: 'animation') Animation? animation,
}) = _Game;