flutter_showcaseview icon indicating copy to clipboard operation
flutter_showcaseview copied to clipboard

Bug when changing app theme

Open mehrdad1990 opened this issue 9 months ago • 1 comments

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 avatar May 15 '24 11:05 mehrdad1990