LudoPlayer class

Describes a single Ludo player.

Per the flutter_ludo specification, a player is intentionally a thin model exposing only name and color — every rule and board-geometry behaviour is fixed and handled internally by the engine, so there is nothing else for a developer to configure here.

Annotations

Constructors

LudoPlayer({required String name, required Color color})
const
LudoPlayer.fromJson(Map<String, Object?> json)
Inverse of toJson.
factory

Properties

color → Color
Color used to render this player's pieces, home base, and home stretch.
final
hashCode → int
The hash code for this object.
no setteroverride
name → String
Display name shown in the UI (e.g. in LudoGame's status bar).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

operator ==(Object other) → bool
The equality operator.
override