copyWith method

MessageSendOptions copyWith({
  1. bool? disableNotification,
  2. bool? fromBackground,
  3. bool? protectContent,
  4. bool? updateOrderOfInstalledStickerSets,
  5. MessageSchedulingState? schedulingState()?,
  6. int? sendingId,
  7. 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({
  bool? disableNotification,
  bool? fromBackground,
  bool? protectContent,
  bool? updateOrderOfInstalledStickerSets,
  MessageSchedulingState? Function()? schedulingState,
  int? sendingId,
  bool? onlyPreview,
}) =>
    MessageSendOptions(
      disableNotification: disableNotification ?? this.disableNotification,
      fromBackground: fromBackground ?? this.fromBackground,
      protectContent: protectContent ?? this.protectContent,
      updateOrderOfInstalledStickerSets: updateOrderOfInstalledStickerSets ??
          this.updateOrderOfInstalledStickerSets,
      schedulingState:
          schedulingState != null ? schedulingState() : this.schedulingState,
      sendingId: sendingId ?? this.sendingId,
      onlyPreview: onlyPreview ?? this.onlyPreview,
    );