qr.flutter icon indicating copy to clipboard operation
qr.flutter copied to clipboard

Bug: QRImage disappears on eyeball customisation

Open ShimronAlakkal opened this issue 3 years ago • 2 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()

ShimronAlakkal avatar Jun 05 '22 07:06 ShimronAlakkal

This might help https://www.youtube.com/watch?v=9ADSWmPCJMg&list=PLQhQEGkwKZUqZC2QAp_u4ZAzqpsCCRvmM&index=6 https://www.youtube.com/watch?v=ZRUE1i15TYw&list=PLQhQEGkwKZUqZC2QAp_u4ZAzqpsCCRvmM&index=7

BraveEvidence avatar Mar 08 '23 07:03 BraveEvidence