copyWith method

MobileScannerState copyWith({
  1. int? availableCameras,
  2. CameraFacing? cameraDirection,
  3. MobileScannerException? error,
  4. bool? isInitialized,
  5. bool? isRunning,
  6. Size? size,
  7. TorchState? torchState,
  8. double? zoomScale,
})

Create a copy of this state with the given parameters.

Implementation

MobileScannerState copyWith({
  int? availableCameras,
  CameraFacing? cameraDirection,
  MobileScannerException? error,
  bool? isInitialized,
  bool? isRunning,
  Size? size,
  TorchState? torchState,
  double? zoomScale,
}) {
  return MobileScannerState(
    availableCameras: availableCameras ?? this.availableCameras,
    cameraDirection: cameraDirection ?? this.cameraDirection,
    error: error,
    isInitialized: isInitialized ?? this.isInitialized,
    isRunning: isRunning ?? this.isRunning,
    size: size ?? this.size,
    torchState: torchState ?? this.torchState,
    zoomScale: zoomScale ?? this.zoomScale,
  );
}