Game class abstract

This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.

Annotations
  • @freezed

Constructors

Game.new({@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.
const
factory
Game.fromJson(Map<String, dynamic> json)
Creates a Game object from JSON object.
factory

Properties

animation Animation?
Optional. Animation that will be displayed in the game message in chats.
no setterinherited
copyWith → $GameCopyWith<Game>
Create a copy of Game with the given fields replaced by the non-null parameter values.
no setterinherited
description String
Description of the game
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
photo List<PhotoSize>
Photo that will be displayed in the game message in chats.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String?
Optional. Brief description of the game or high scores included in the game message.
no setterinherited
textEntities List<MessageEntity>?
Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
no setterinherited
title String
Title of the game
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this Game to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited