copyWith method
Poll
copyWith({
- int? id,
- FormattedText? question,
- List<
PollOption> ? options, - int? totalVoterCount,
- List<
MessageSender> ? recentVoterIds, - bool? canGetVoters,
- bool? canSeeResults,
- bool? isAnonymous,
- bool? allowsMultipleAnswers,
- bool? allowsRevoting,
- bool? membersOnly,
- List<
String> ? countryCodes, - List<
int> ? optionOrder, - PollType? type,
- int? openPeriod,
- int? closeDate,
- bool? isClosed,
- PollVoteRestrictionReason? voteRestrictionReason,
Implementation
Poll copyWith({
int? id,
FormattedText? question,
List<PollOption>? options,
int? totalVoterCount,
List<MessageSender>? recentVoterIds,
bool? canGetVoters,
bool? canSeeResults,
bool? isAnonymous,
bool? allowsMultipleAnswers,
bool? allowsRevoting,
bool? membersOnly,
List<String>? countryCodes,
List<int>? optionOrder,
PollType? type,
int? openPeriod,
int? closeDate,
bool? isClosed,
PollVoteRestrictionReason? voteRestrictionReason,
}) => Poll(
id: id ?? this.id,
question: question ?? this.question,
options: options ?? this.options,
totalVoterCount: totalVoterCount ?? this.totalVoterCount,
recentVoterIds: recentVoterIds ?? this.recentVoterIds,
canGetVoters: canGetVoters ?? this.canGetVoters,
canSeeResults: canSeeResults ?? this.canSeeResults,
isAnonymous: isAnonymous ?? this.isAnonymous,
allowsMultipleAnswers: allowsMultipleAnswers ?? this.allowsMultipleAnswers,
allowsRevoting: allowsRevoting ?? this.allowsRevoting,
membersOnly: membersOnly ?? this.membersOnly,
countryCodes: countryCodes ?? this.countryCodes,
optionOrder: optionOrder ?? this.optionOrder,
type: type ?? this.type,
openPeriod: openPeriod ?? this.openPeriod,
closeDate: closeDate ?? this.closeDate,
isClosed: isClosed ?? this.isClosed,
voteRestrictionReason: voteRestrictionReason ?? this.voteRestrictionReason,
);