InsanichessPlayer class

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.
no setteroverride
id String
The id of the player.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
username String
The username of the player.
final

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
Two players are equal if they have the same id.
override