Game class

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

Constructors

Game({required String title, required String description, required List<PhotoSize> photo, String? text, List<MessageEntity>? textEntities, Animation? animation})
Basic constructor

Properties

animation Animation?
Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
getter/setter pair
description String
Description of the game
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
photo List<PhotoSize>
Photo that will be displayed in the game message in chats.
getter/setter pair
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. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.
getter/setter pair
textEntities List<MessageEntity>?
Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
getter/setter pair
title String
Title of the game
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map
Creates a json from the object
toString() String
A string representation of this object.
override

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) Game
Creates a object from a json