copyWith method

ESPTouchTaskParameter copyWith({
  1. Duration? intervalGuideCode,
  2. Duration? intervalDataCode,
  3. Duration? timeoutGuideCode,
  4. Duration? timeoutDataCode,
  5. int? repeat,
  6. int? oneLength,
  7. int? macLength,
  8. int? ipLength,
  9. int? portListening,
  10. int? portTarget,
  11. Duration? waitUdpReceiving,
  12. Duration? waitUdpSending,
  13. int? thresholdSucBroadcastCount,
  14. int? expectedTaskResults,
})

Copy the task parameter with some fields changed.

Implementation

ESPTouchTaskParameter copyWith({
  Duration? intervalGuideCode,
  Duration? intervalDataCode,
  Duration? timeoutGuideCode,
  Duration? timeoutDataCode,
  int? repeat,
  int? oneLength,
  int? macLength,
  int? ipLength,
  int? portListening,
  int? portTarget,
  Duration? waitUdpReceiving,
  Duration? waitUdpSending,
  int? thresholdSucBroadcastCount,
  int? expectedTaskResults,
}) {
  return ESPTouchTaskParameter(
    intervalGuideCode: intervalGuideCode ?? this.intervalGuideCode,
    intervalDataCode: intervalDataCode ?? this.intervalDataCode,
    timeoutGuideCode: timeoutGuideCode ?? this.timeoutGuideCode,
    timeoutDataCode: timeoutDataCode ?? this.timeoutDataCode,
    repeat: repeat ?? this.repeat,
    oneLength: oneLength ?? this.oneLength,
    macLength: macLength ?? this.macLength,
    ipLength: ipLength ?? this.ipLength,
    portListening: portListening ?? this.portListening,
    portTarget: portTarget ?? this.portTarget,
    waitUdpReceiving: waitUdpReceiving ?? this.waitUdpReceiving,
    waitUdpSending: waitUdpSending ?? this.waitUdpSending,
    thresholdSucBroadcastCount:
        thresholdSucBroadcastCount ?? this.thresholdSucBroadcastCount,
    expectedTaskResults: expectedTaskResults ?? this.expectedTaskResults,
  );
}