InsanichessPlayer class Null safety

A player of the game.

This class contains all the necessary data for a player / user.

Constructors

InsanichessPlayer({required String id, required String username})
Constructs new InsanichessPlayer with given id and username.
const
InsanichessPlayer.fromJson(Map<String, dynamic> json)
Constructs new InsanichessPlayer from json.
InsanichessPlayer.testBlack()
Constructs new InsanichessPlayer for testing purposes.
const
InsanichessPlayer.testWhite()
Constructs new InsanichessPlayer for testing purposes.
const

Properties

hashCode int
The hash code for this object.
read-onlyoverride
id String
The id of the player.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
username String
The username of the player.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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
Two players are equal if they have the same id.
override