copyWith method

LMFeedPoll copyWith({
  1. ValueNotifier<bool>? rebuildPollWidget,
  2. LMAttachmentMetaViewData? attachmentMeta,
  3. VoidCallback? onCancel,
  4. dynamic onEdit(
    1. LMAttachmentMetaViewData
    )?,
  5. dynamic onEditVote(
    1. LMAttachmentMetaViewData
    )?,
  6. LMFeedPollStyle? style,
  7. void onOptionSelect(
    1. LMPollOptionViewData
    )?,
  8. bool? showSubmitButton,
  9. bool? showAddOptionButton,
  10. bool? showEditVoteButton,
  11. bool? isVoteEditing,
  12. bool showTick(
    1. LMPollOptionViewData
    )?,
  13. String? timeLeft,
  14. void onAddOptionSubmit(
    1. String option
    )?,
  15. dynamic onVoteClick(
    1. LMPollOptionViewData
    )?,
  16. List<String>? selectedOption,
  17. dynamic onSubmit(
    1. List<String> selectedOption
    )?,
  18. VoidCallback? onSubtextTap,
  19. Widget pollQuestionBuilder(
    1. BuildContext
    )?,
  20. Widget pollOptionBuilder(
    1. BuildContext
    )?,
  21. Widget pollSelectionTextBuilder(
    1. BuildContext
    )?,
  22. String? pollSelectionText,
  23. Widget addOptionButtonBuilder(
    1. BuildContext,
    2. LMFeedButton,
    3. dynamic (
      1. String
      )
    )?,
  24. LMFeedButtonBuilder? submitButtonBuilder,
  25. Widget subTextBuilder(
    1. BuildContext
    )?,
  26. VoidCallback? onSameOptionAdded,
  27. bool? isMultiChoicePoll,
})

Implementation

LMFeedPoll copyWith({
  ValueNotifier<bool>? rebuildPollWidget,
  LMAttachmentMetaViewData? attachmentMeta,
  VoidCallback? onCancel,
  Function(LMAttachmentMetaViewData)? onEdit,
  Function(LMAttachmentMetaViewData)? onEditVote,
  LMFeedPollStyle? style,
  void Function(LMPollOptionViewData)? onOptionSelect,
  bool? showSubmitButton,
  bool? showAddOptionButton,
  bool? showEditVoteButton,
  bool? isVoteEditing,
  bool Function(LMPollOptionViewData)? showTick,
  String? timeLeft,
  void Function(String option)? onAddOptionSubmit,
  Function(LMPollOptionViewData)? onVoteClick,
  List<String>? selectedOption,
  Function(List<String> selectedOption)? onSubmit,
  VoidCallback? onSubtextTap,
  Widget Function(BuildContext)? pollQuestionBuilder,
  Widget Function(BuildContext)? pollOptionBuilder,
  Widget Function(BuildContext)? pollSelectionTextBuilder,
  String? pollSelectionText,
  Widget Function(BuildContext, LMFeedButton, Function(String))?
      addOptionButtonBuilder,
  LMFeedButtonBuilder? submitButtonBuilder,
  Widget Function(BuildContext)? subTextBuilder,
  VoidCallback? onSameOptionAdded,
  bool? isMultiChoicePoll,
}) {
  return LMFeedPoll(
    rebuildPollWidget: rebuildPollWidget ?? this.rebuildPollWidget,
    attachmentMeta: attachmentMeta ?? this.attachmentMeta,
    onCancel: onCancel ?? this.onCancel,
    onEdit: onEdit ?? this.onEdit,
    onEditVote: onEditVote ?? this.onEditVote,
    style: style ?? this.style,
    onOptionSelect: onOptionSelect ?? this.onOptionSelect,
    showSubmitButton: showSubmitButton ?? this.showSubmitButton,
    showAddOptionButton: showAddOptionButton ?? this.showAddOptionButton,
    showEditVoteButton: showEditVoteButton ?? this.showEditVoteButton,
    isVoteEditing: isVoteEditing ?? this.isVoteEditing,
    showTick: showTick ?? this.showTick,
    timeLeft: timeLeft ?? this.timeLeft,
    onAddOptionSubmit: onAddOptionSubmit ?? this.onAddOptionSubmit,
    onVoteClick: onVoteClick ?? this.onVoteClick,
    selectedOption: selectedOption ?? this.selectedOption,
    onSubmit: onSubmit ?? this.onSubmit,
    onSubtextTap: onSubtextTap ?? this.onSubtextTap,
    pollQuestionBuilder: pollQuestionBuilder ?? this.pollQuestionBuilder,
    pollOptionBuilder: pollOptionBuilder ?? this.pollOptionBuilder,
    pollSelectionTextBuilder:
        pollSelectionTextBuilder ?? this.pollSelectionTextBuilder,
    pollSelectionText: pollSelectionText ?? this.pollSelectionText,
    addOptionButtonBuilder:
        addOptionButtonBuilder ?? this.addOptionButtonBuilder,
    submitButtonBuilder: submitButtonBuilder ?? this.submitButtonBuilder,
    subTextBuilder: subTextBuilder ?? this.subTextBuilder,
    onSameOptionAdded: onSameOptionAdded ?? this.onSameOptionAdded,
    isMultiChoicePoll: isMultiChoicePoll ?? this.isMultiChoicePoll,
  );
}