ResignedGameEvent class

Event that can contain data on who resigned. When a user sends this event to the server, player is empty and is acquired from JWT token. When server broadcasts this event, the player is included.

This event is always broadcasted because subscribers need to know that the game ended and a player that resigned.

Inheritance

Constructors

ResignedGameEvent({PieceColor? player})
Creates new ResignedGameEvent with the color of the player. This event is always broadcasted because subscribers of the broadcast stream must know that a game has ended and who resigned.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isBroadcasted bool
Whether this event should be broadcasted or not. Events that are not broadcasted are only sent to opponent's socket.
finalinherited
player → PieceColor?
The color of the player that resigned.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type GameEventType
The type of this event. This is used to efficiently parse the game event data from received json.
finalinherited

Methods

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

Operators

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