toJson method

Map<String, dynamic> toJson()

Returns the data fields of ForegroundTaskOptions in JSON format.

Implementation

Map<String, dynamic> toJson() {
  return {
    'taskEventAction': eventAction.toJson(),
    'autoRunOnBoot': autoRunOnBoot,
    'autoRunOnMyPackageReplaced': autoRunOnMyPackageReplaced,
    'allowWakeLock': allowWakeLock,
    'allowWifiLock': allowWifiLock,
  };
}