Skip to content
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

Open
mehrdad1990 opened this issue May 15, 2024 · 1 comment
Open

Bug when changing app theme #437

mehrdad1990 opened this issue May 15, 2024 · 1 comment

Comments

@mehrdad1990
Copy link

mehrdad1990 commented May 15, 2024

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?

@mehrdad1990
Copy link
Author

layout_overlays.dart:72:19 this is the real cause. I guess it is because of rootRenderObject

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant