CameraScannerWidget constructor

const CameraScannerWidget({
  1. Key? key,
  2. required void onScan(
    1. BuildContext,
    2. CreditCardModel?
    ),
  3. required Widget loadingHolder,
  4. required void onNoCamera(),
  5. double? aspectRatio,
  6. bool cardNumber = true,
  7. bool cardHolder = true,
  8. bool cardExpiryDate = true,
  9. Color? colorOverlay,
  10. ShapeBorder? shapeBorder,
  11. bool useLuhnValidation = true,
  12. bool debug = kDebugMode,
  13. Duration? durationOfNextFrame,
  14. ResolutionPreset? resolutionPreset,
})

Creates a CameraScannerWidget.

The onScan, loadingHolder, and onNoCamera parameters are required.

Implementation

const CameraScannerWidget({
  super.key,
  required this.onScan,
  required this.loadingHolder,
  required this.onNoCamera,
  this.aspectRatio,
  this.cardNumber = true,
  this.cardHolder = true,
  this.cardExpiryDate = true,
  this.colorOverlay,
  this.shapeBorder,
  this.useLuhnValidation = true,
  this.debug = kDebugMode,
  this.durationOfNextFrame,
  this.resolutionPreset,
});