copyWith method

BatteryAuditData copyWith({
  1. int? id,
  2. DateTime? createdAt,
  3. int? percentage,
  4. bool? isCharging,
  5. BatteryAuditStatus? status,
  6. int? capacity,
  7. bool? isScreenOn,
})

Implementation

BatteryAuditData copyWith(
        {int? id,
        DateTime? createdAt,
        int? percentage,
        bool? isCharging,
        BatteryAuditStatus? status,
        int? capacity,
        bool? isScreenOn}) =>
    BatteryAuditData(
      id: id ?? this.id,
      createdAt: createdAt ?? this.createdAt,
      percentage: percentage ?? this.percentage,
      isCharging: isCharging ?? this.isCharging,
      status: status ?? this.status,
      capacity: capacity ?? this.capacity,
      isScreenOn: isScreenOn ?? this.isScreenOn,
    );