CodeScannerView constructor

const CodeScannerView({
  1. Key? key,
  2. void onDetect(
    1. ScanResult result
    )?,
  3. CodeScannerController? controller,
  4. List<String>? formats,
  5. BoxFit fit = BoxFit.cover,
  6. bool showOverlay = true,
  7. Widget? overlay,
  8. ScanMode scanMode = ScanMode.single,
  9. DuplicateFilter duplicateFilter = DuplicateFilter.cooldown,
  10. Duration duplicateCooldown = const Duration(seconds: 2),
})

Implementation

const CodeScannerView({
  super.key,
  this.onDetect,
  this.controller,
  this.formats,
  this.fit = BoxFit.cover,
  this.showOverlay = true,
  this.overlay,
  this.scanMode = ScanMode.single,
  this.duplicateFilter = DuplicateFilter.cooldown,
  this.duplicateCooldown = const Duration(seconds: 2),
});