copyWith method
MessageSendOptions
copyWith({
- InputSuggestedPostInfo? suggestedPostInfo()?,
- bool? disableNotification,
- bool? fromBackground,
- bool? protectContent,
- bool? allowPaidBroadcast,
- int? paidMessageStarCount,
- bool? updateOrderOfInstalledStickerSets,
- MessageSchedulingState? schedulingState()?,
- int? effectId,
- int? sendingId,
- bool? onlyPreview,
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
MessageSendOptions copyWith({
InputSuggestedPostInfo? Function()? suggestedPostInfo,
bool? disableNotification,
bool? fromBackground,
bool? protectContent,
bool? allowPaidBroadcast,
int? paidMessageStarCount,
bool? updateOrderOfInstalledStickerSets,
MessageSchedulingState? Function()? schedulingState,
int? effectId,
int? sendingId,
bool? onlyPreview,
}) => MessageSendOptions(
suggestedPostInfo: suggestedPostInfo != null
? suggestedPostInfo()
: this.suggestedPostInfo,
disableNotification: disableNotification ?? this.disableNotification,
fromBackground: fromBackground ?? this.fromBackground,
protectContent: protectContent ?? this.protectContent,
allowPaidBroadcast: allowPaidBroadcast ?? this.allowPaidBroadcast,
paidMessageStarCount: paidMessageStarCount ?? this.paidMessageStarCount,
updateOrderOfInstalledStickerSets:
updateOrderOfInstalledStickerSets ??
this.updateOrderOfInstalledStickerSets,
schedulingState: schedulingState != null
? schedulingState()
: this.schedulingState,
effectId: effectId ?? this.effectId,
sendingId: sendingId ?? this.sendingId,
onlyPreview: onlyPreview ?? this.onlyPreview,
);