copyWith method

  1. @override
UpdatePollAnswer copyWith({
  1. int? pollId,
  2. MessageSender? voterId,
  3. List<String>? optionIds,
  4. List<int>? optionPositions,
  5. dynamic extra,
  6. int? clientId,
})
override

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

@override
UpdatePollAnswer copyWith({
  int? pollId,
  MessageSender? voterId,
  List<String>? optionIds,
  List<int>? optionPositions,
  dynamic extra,
  int? clientId,
}) => UpdatePollAnswer(
  pollId: pollId ?? this.pollId,
  voterId: voterId ?? this.voterId,
  optionIds: optionIds ?? this.optionIds,
  optionPositions: optionPositions ?? this.optionPositions,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);