PowerSavingStrategy constructor

PowerSavingStrategy({
  1. double? batteryThreshold,
  2. Iterable<String>? activeModules,
  3. Iterable<String>? pausedModules,
  4. Map<String, PowerProfile>? powerProfiles,
  5. bool? wakeLock,
  6. bool? disableNetworkConnections,
  7. bool? disableWifiAndBluetooth,
})

Implementation

factory PowerSavingStrategy({
  $core.double? batteryThreshold,
  $core.Iterable<$core.String>? activeModules,
  $core.Iterable<$core.String>? pausedModules,
  $core.Map<$core.String, PowerProfile>? powerProfiles,
  $core.bool? wakeLock,
  $core.bool? disableNetworkConnections,
  $core.bool? disableWifiAndBluetooth,
}) {
  final $result = create();
  if (batteryThreshold != null) {
    $result.batteryThreshold = batteryThreshold;
  }
  if (activeModules != null) {
    $result.activeModules.addAll(activeModules);
  }
  if (pausedModules != null) {
    $result.pausedModules.addAll(pausedModules);
  }
  if (powerProfiles != null) {
    $result.powerProfiles.addAll(powerProfiles);
  }
  if (wakeLock != null) {
    $result.wakeLock = wakeLock;
  }
  if (disableNetworkConnections != null) {
    $result.disableNetworkConnections = disableNetworkConnections;
  }
  if (disableWifiAndBluetooth != null) {
    $result.disableWifiAndBluetooth = disableWifiAndBluetooth;
  }
  return $result;
}