copyWith method

  1. @override
MessageGameScore copyWith({
  1. int? gameMessageId,
  2. int? gameId,
  3. int? score,
})
override

Copy model with modified properties.

Properties:

  • game_message_id: Identifier of the message with the game, can be an identifier of a deleted message
  • game_id: Identifier of the game; may be different from the games presented in the message with the game
  • score: New score

Implementation

@override
MessageGameScore copyWith({
  int? gameMessageId,
  int? gameId,
  int? score,
}) =>
    MessageGameScore(
      gameMessageId: gameMessageId ?? this.gameMessageId,
      gameId: gameId ?? this.gameId,
      score: score ?? this.score,
    );