copyWith method

DevicePowerPowerState copyWith({
  1. String? batteryState,
  2. int? batteryLevel,
})

Returns a copy of this object with its field values replaced by the ones provided to this method.

Implementation

DevicePowerPowerState copyWith({
  String? batteryState,
  int? batteryLevel,
}) {
  return DevicePowerPowerState(
    batteryState: batteryState ?? this.batteryState,
    batteryLevel: batteryLevel ?? this.batteryLevel,
  );
}