bigship/barcode.flutter

Background is not painted fully

mikuhl-dev opened this issue · 1 comments

image
You can see the barcode goes past the end of the backgroundColor: Colors.white

I resolved this problem by the code like below.

Container(
  color: Colors.white,
  constraints: BoxConstraints.expand(width: 247, height: 70),
  child: Center(
    child: BarCodeImage(
      data: "123456789",
      codeType: BarCodeType.Code39,
      backgroundColor: Colors.white,
      barHeight: 50,
      lineWidth: 1,
      hasText: true,
    ),
  ),
),