theyakka / qr.flutter

QR.Flutter is a Flutter library for simple and fast QR code rendering via a Widget or custom painter.

Home Page:https://pub.dev/packages/qr_flutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: QRImage disappears on eyeball customisation

ShimronAlakkal opened this issue · comments

Describe the bug
When using the eyeStyleing, the existing qr image disappears.

Code

 Center(
              child: QrImage(
                  gapless: false,
                  semanticsLabel: 'Proud Zellow User',
                  data: baseUrl + FirebaseAuth.instance.currentUser!.uid,
                  dataModuleStyle: QrDataModuleStyle(
                    dataModuleShape: QrDataModuleShape.circle,
                    color: ColorPalette().secondaryTextColor,
                  ),
                  eyeStyle: QrEyeStyle(eyeShape: QrEyeShape.circle),
                  size: MediaQuery.of(context).size.height * 0.35),
            ),

Error on debug

The following _CastError was thrown during paint():
Null check operator used on a null value

The relevant error-causing widget was
QrImage

The following RenderObject was being processed when the exception was fired: RenderCustomPaint#c2ad7
RenderObject: RenderCustomPaint#c2ad7
    parentData: offset=Offset(10.0, 10.0) (can use size)
    constraints: BoxConstraints(w=238.1, h=238.1)
    size: Size(238.1, 238.1)
    painter: QrPainter#0a4bb()