bigship / barcode.flutter

barcode generate library for Flutter
BSD 2-Clause "Simplified" License
59 stars 27 forks source link

Background is not painted fully #5

Closed mikuhl-dev closed 5 years ago

mikuhl-dev commented 5 years ago

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

yasunari89 commented 5 years ago

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,
    ),
  ),
),