-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: QRImage disappears on eyeball customisation #179
Labels
bug
Something isn't working
Comments
Having the same issue while developing a macOS desktop app, i also successfully reproduced the same bug in a new empty project without any other dependencies. The issue only appears if i specify either import 'package:flutter/material.dart';
import 'package:qr_flutter/qr_flutter.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
QrImageView(
data: 'placeholder',
version: QrVersions.auto,
size: 300,
gapless: true,
dataModuleStyle: const QrDataModuleStyle(
dataModuleShape: QrDataModuleShape.circle,
),
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
),
);
}
}
════════ Exception caught by rendering library ═════════════════════════════════
Null check operator used on a null value
The relevant error-causing widget was:
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
Null check operator used on a null value
The relevant error-causing widget was:
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
Null check operator used on a null value
The relevant error-causing widget was:
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
The following _TypeError was thrown during paint():
Null check operator used on a null value
The relevant error-causing widget was:
QrImageView QrImageView:file:///REDACTED/lib/screens/auth/auth_screen.dart:281:23
When the exception was thrown, this was the stack:
#0 QrPainter._drawFinderPatternItem (package:qr_flutter/src/qr_painter.dart:358:63)
#1 QrPainter.paint (package:qr_flutter/src/qr_painter.dart:207:5)
#2 RenderCustomPaint._paintWithPainter (package:flutter/src/rendering/custom_paint.dart:588:13)
#3 RenderCustomPaint.paint (package:flutter/src/rendering/custom_paint.dart:630:7)
#4 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#5 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#6 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:74:15)
#7 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#8 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#9 _RenderColoredBox.paint (package:flutter/src/widgets/basic.dart:7826:15)
#10 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#11 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#12 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:130:13)
#13 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#14 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#15 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:130:13)
#16 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#17 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#18 _RenderLayoutBuilder.paint (package:flutter/src/widgets/layout_builder.dart:356:15)
#19 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#20 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#21 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:3158:15)
#22 RenderFlex.paint (package:flutter/src/rendering/flex.dart:1014:7)
#23 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#24 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#25 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:130:13)
#26 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#27 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#28 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:74:15)
#29 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#30 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#31 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:3158:15)
#32 RenderCustomMultiChildLayoutBox.paint (package:flutter/src/rendering/custom_layout.dart:409:5)
#33 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#34 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#35 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:130:13)
#36 _RenderInkFeatures.paint (package:flutter/src/material/material.dart:662:11)
#37 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#38 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#39 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:130:13)
#40 RenderPhysicalModel.paint.<anonymous closure> (package:flutter/src/rendering/proxy_box.dart:2033:15)
#41 PaintingContext.pushClipRRect (package:flutter/src/rendering/object.dart:575:14)
#42 RenderPhysicalModel.paint (package:flutter/src/rendering/proxy_box.dart:2020:21)
#43 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#44 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#45 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:3158:15)
#46 RenderCustomMultiChildLayoutBox.paint (package:flutter/src/rendering/custom_layout.dart:409:5)
#47 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#48 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#49 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:130:13)
#50 _RenderInkFeatures.paint (package:flutter/src/material/material.dart:662:11)
#51 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#52 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#53 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:130:13)
#54 RenderPhysicalModel.paint.<anonymous closure> (package:flutter/src/rendering/proxy_box.dart:2033:15)
#55 PaintingContext.pushClipRRect (package:flutter/src/rendering/object.dart:575:14)
#56 RenderPhysicalModel.paint (package:flutter/src/rendering/proxy_box.dart:2020:21)
#57 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#58 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#59 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:130:13)
#60 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#61 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#62 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:130:13)
#63 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#64 PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:166:11)
#65 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:109:5)
#66 PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:1182:31)
#67 PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:1192:15)
#68 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:579:23)
#69 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1138:13)
#70 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:443:5)
#71 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1392:15)
#72 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1313:9)
#73 SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:1035:9)
#74 PlatformDispatcher.scheduleWarmUpFrame.<anonymous closure> (dart:ui/platform_dispatcher.dart:837:16)
#78 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
(elided 3 frames from class _Timer and dart:async-patch)
The following RenderObject was being processed when the exception was fired: RenderCustomPaint#ca91d
parentData: offset=Offset(10.0, 10.0) (can use size)
constraints: BoxConstraints(w=280.0, h=280.0)
size: Size(280.0, 280.0)
painter: QrPainter#5c6c2()
RenderObject: RenderCustomPaint#ca91d
parentData: offset=Offset(10.0, 10.0) (can use size)
constraints: BoxConstraints(w=280.0, h=280.0)
size: Size(280.0, 280.0)
painter: QrPainter#5c6c2()
════════════════════════════════════════════════════════════════════════════════
Reloaded 1 of 3657 libraries in 477ms (compile: 34 ms, reload: 274 ms, reassemble: 161 ms).
════════ Exception caught by rendering library ═════════════════════════════════
Null check operator used on a null value
The relevant error-causing widget was:
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
Null check operator used on a null value
The relevant error-causing widget was:
════════════════════════════════════════════════════════════════════════════════ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When using the eyeStyleing, the existing qr image disappears.
Code
Error on debug
The text was updated successfully, but these errors were encountered: