copyWith method

Sensor copyWith({
  1. String? name,
  2. String? vendor,
  3. int? version,
  4. int? type,
  5. double? maxRange,
  6. double? resolution,
  7. double? power,
  8. int? minDelay,
  9. int? reportingMode,
  10. bool? isDynamicSensor,
  11. bool? isWakeUpSensor,
  12. int? fifoReservedEventCount,
  13. int? fifoMaxEventCount,
  14. String? stringYpe,
  15. int? maxDelay,
  16. int? id,
})

Implementation

Sensor copyWith({
  String? name,
  String? vendor,
  int? version,
  int? type,
  double? maxRange,
  double? resolution,
  double? power,
  int? minDelay,
  int? reportingMode,
  bool? isDynamicSensor,
  bool? isWakeUpSensor,
  int? fifoReservedEventCount,
  int? fifoMaxEventCount,
  String? stringYpe,
  int? maxDelay,
  int? id,
}) {
  return Sensor(
    name: name ?? this.name,
    vendor: vendor ?? this.vendor,
    version: version ?? this.version,
    type: type ?? this.type,
    maxRange: maxRange ?? this.maxRange,
    resolution: resolution ?? this.resolution,
    power: power ?? this.power,
    minDelay: minDelay ?? this.minDelay,
    reportingMode: reportingMode ?? this.reportingMode,
    isDynamicSensor: isDynamicSensor ?? this.isDynamicSensor,
    isWakeUpSensor: isWakeUpSensor ?? this.isWakeUpSensor,
    fifoReservedEventCount:
        fifoReservedEventCount ?? this.fifoReservedEventCount,
    fifoMaxEventCount: fifoMaxEventCount ?? this.fifoMaxEventCount,
    stringYpe: stringYpe ?? this.stringYpe,
    maxDelay: maxDelay ?? this.maxDelay,
    id: id ?? this.id,
  );
}