Player constructor Null safety

const Player(
  1. PlayerID id,
  2. {@Default('') PlayerName name}
)

Represents the basic details of a player in a game

Players have a unique id and an optional name

Implementation

const factory Player(PlayerID id, {@Default('') PlayerName name}) = _Player;