-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
This is not the same as #15. That was a miscalculation of the canvas size required to paint the barcode value with the specified line width.
This issue occurs when the barcode widget is contained by a widget that is smaller than the calculated canvas size. In the example below, the barcode is in an Expanded widget between two SizedBox widgets. The code snippet below shows how the border around the canvas is applied.
return Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: Colors.red,
),
child: BarCodeImage(
data: "62733538535715976",
codeType: BarCodeType.Code39,
lineWidth: 2.5,
barHeight: 150.0,
),
);
So, rather than this, it would be better if the painter was aware of the actual width of canvas it has to work with and, if the canvas is too small, scale the barcode line width accordingly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
