-
Notifications
You must be signed in to change notification settings - Fork 460
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 when changing app theme #437
Comments
layout_overlays.dart:72:19 this is the real cause. I guess it is because of rootRenderObject |
Hello @mehrdad1990, I have tried reproducing your issue in the example app provided in this package's code with flutter 3.22 and 3.16 and have failed to face such as issue. Can you please share a minimal reproducible code or try your approach in the example app to see if you still face the issue? |
I guess I have a similar problem as this issue |
@mehrdad1990, the issue you have mentioned is talking about findRenderObject and it is present in 2.0.3 as well so it's not the cause of your problem. Also rootRenderObject is new but it is nullable and so it wouldn't cause any issue. Try your approach in the example app and verify if you still face the issue. Closing the issue, feel free to reopen if you face issue in the example app. |
@rashi-simform
and this is the code from showcaseview 2.0.3 which I don't have problem with:
the only logical issue that seems to cause the problem is with ancestor: rootRenderObject,.
so in my case this rootRenderObject changes when I'm changing app theme because I have to rebuild MaterialApp as you know it should happen for changing theme. Therefore, this rootRenderObject causes issue because of this rebuild on the MaterialApp parent. That's why I said this rootRenderObject is causing the problem here because it doesn't exist in 2.0.3 and it it working for me. I think there should be a way in 3.0.0 to sort it out. Any ideas? |
Hi and thanks for the beautiful plugin.
I have this issue after upgrading to Flutter 3.22 that when I change my app theme to dark or light mode my widgets that have Showcase.withWidget as their parent will throw errors.
Errors:
'package:flutter/src/rendering/object.dart': Failed assertion: line 3347 pos 14: 'renderer.parent != null': is not true.
#0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2 RenderObject.getTransformTo (package:flutter/src/rendering/object.dart:3347:14)
#3 RenderBox.localToGlobal (package:flutter/src/rendering/box.dart:2886:39)
#4 AnchoredOverlay.build.. (package:showcaseview/src/layout_overlays.dart:72:19)
layout_overlays.dart line 72 shows error as well as get_position.dart line 53
I went through your code and debugged it but didn't find any solutions.
I don't have this issue with the previous Flutter SDK.
I don't have this issue even in Flutter 3.22 when changing theme if I remove your plugin's widgets as parents.
changing theme causes everything to rebuild but I don't know how it relates with your widgets that throw errors!!!
What could be the problem and how to fix it?
The text was updated successfully, but these errors were encountered: