PlayerRegisterRequest constructor

PlayerRegisterRequest({
  1. required String playerUniqueID,
  2. required String deviceToken,
  3. String? osType,
  4. PlayerAttributes? playerAttributes,
  5. String? referrerCode,
  6. String? email,
  7. String? mobileNumber,
})

Creates a new PlayerRegisterRequest object.

Arguments:

  • playerUniqueID (required): The unique identifier for the player.
  • deviceToken (required): The player's device token.
  • osType (optional): The operating system type (automatically set if not provided).
  • playerAttributes (optional): Additional player attributes.
  • referrerCode (optional): A referral code associated with the player.
  • email (optional): The player's email address.
  • mobileNumber (optional): The player's mobile number.

Implementation

PlayerRegisterRequest({
  required this.playerUniqueID,
  required this.deviceToken,
  this.osType,
  this.playerAttributes,
  this.referrerCode,
  this.email,
  this.mobileNumber,
}) {
  osType = getDevicePlatform(); // Automatically set osType based on platform
}