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