toJson method

  1. @override
Map<String, Object?> toJson()
override

Converts this object to json representation.

This object should only be transmitted to user once at the start of the game. A client that accepted the challenge should then query the server for this object. A client that is awaiting challenge accept should query for this object after it finds out that the game is accepted.

Implementation

@override
Map<String, Object?> toJson() {
  return <String, Object?>{
    InsanichessLiveGameJsonKey.undoAllowed: undoAllowed,
    ...super.toJson(),
  };
}