GameInfo class

An object to provide info about a particular game to the client

Includes

  • The game's gameId on the server
  • The game's gameType
  • A list of players who are part of the game
  • The player's id in the game
  • Whether the player is the creator of the game
Annotations
  • @freezed

Constructors

GameInfo({required GameCode gameId, required IList<PlayerName> players, required PlayerName player, required bool creator, required GameType gameType, required GameStatus status})
const
factory
GameInfo.fromJson(Map<String, dynamic> map)
factory

Properties

copyWith → $GameInfoCopyWith<GameInfo>
no setterinherited
creator bool
no setterinherited
gameId String
no setterinherited
gameType String
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
player String
no setterinherited
players IList<String>
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status GameStatus
no setterinherited

Methods

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

Operators

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