copyWith method
Creates a copy of the object replaced with new values.
Implementation
ForegroundTaskOptions copyWith({
ForegroundTaskEventAction? eventAction,
bool? autoRunOnBoot,
bool? autoRunOnMyPackageReplaced,
bool? allowWakeLock,
bool? allowWifiLock,
bool? allowAutoRestart,
Object? stopWithTask = _unset,
}) =>
ForegroundTaskOptions(
eventAction: eventAction ?? this.eventAction,
autoRunOnBoot: autoRunOnBoot ?? this.autoRunOnBoot,
autoRunOnMyPackageReplaced: autoRunOnMyPackageReplaced ?? this.autoRunOnMyPackageReplaced,
allowWakeLock: allowWakeLock ?? this.allowWakeLock,
allowWifiLock: allowWifiLock ?? this.allowWifiLock,
allowAutoRestart: allowAutoRestart ?? this.allowAutoRestart,
stopWithTask: identical(stopWithTask, _unset) ? this.stopWithTask : stopWithTask as bool?,
);