Code constructor

const Code({
  1. Key? key,
  2. required String data,
  3. required CodeType codeType,
  4. Color color = Colors.black,
  5. Color? backgroundColor,
  6. Decoration? decoration,
  7. EdgeInsetsGeometry? margin,
  8. EdgeInsetsGeometry? padding,
  9. double? width,
  10. double? height,
  11. bool drawText = true,
  12. TextStyle? style,
  13. double textPadding = 5,
  14. BarcodeErrorBuilder? errorBuilder,
})

Draw a barcode on screen

Implementation

const Code({
  super.key,
  required String data,
  required this.codeType,
  this.color = Colors.black,
  this.backgroundColor,
  this.decoration,
  this.margin,
  this.padding,
  this.width,
  this.height,
  this.drawText = true,
  this.style,
  this.textPadding = 5,
  this.errorBuilder,
})  : _dataBytes = null,
      _dataString = data;