BarCodeImage<T extends BarCodeParams?> constructor
BarCodeImage<T extends BarCodeParams?> ({
- @deprecated String? data,
- @deprecated BarCodeType? codeType,
- @deprecated double lineWidth = 2.0,
- @deprecated double barHeight = 100.0,
- @deprecated bool hasText = false,
- BarCodeParams? params,
- EdgeInsets? padding,
- Color? backgroundColor,
- Color foregroundColor = const Color(0xFF000000),
- BarCodeError? onError,
Implementation
BarCodeImage({
@deprecated this.data,
@deprecated this.codeType,
@deprecated this.lineWidth = 2.0,
@deprecated this.barHeight = 100.0,
@deprecated this.hasText = false,
BarCodeParams? params,
this.padding,
this.backgroundColor,
Color foregroundColor = const Color(0xFF000000),
this.onError,
}) : assert(params != null || (data != null && codeType != null),
"params or data+codeType must be set"),
assert(
(params != null && data == null && codeType == null) ||
(params == null && data != null && codeType != null),
"params and data+codeType cannot be set at the same time"),
_painter = BarCodePainter(
params ??
_getBarcodeParams(
codeType!, data, lineWidth, barHeight, hasText),
foregroundColor,
onError: onError);