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

I keep getting this error when using ShowCaseView: The method 'findAncestorStateOfType' was called on null. #73

Closed
lutang123 opened this issue Oct 5, 2020 · 11 comments
Labels
more-info-required Provide more information

Comments

@lutang123
Copy link

Describe the bug
A clear and concise description of what the bug is.
I have tried different ways, but I keep getting the following errors:

Performing hot reload...
Syncing files to device iPhone 11 Pro Max...
[VERBOSE-2:shell.cc(210)] Dart Unhandled Exception: NoSuchMethodError: The method 'findAncestorStateOfType' was called on null.
Receiver: null
Tried calling: findAncestorStateOfType(), stack trace: #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1 Overlay.of (package:flutter/src/widgets/overlay.dart:258:19)
#2 _OverlayBuilderState.addToOverlay (package:showcaseview/layout_overlays.dart:165:13)
#3 _OverlayBuilderState.showOverlay (package:showcaseview/layout_overlays.dart:157:7)
#4 _OverlayBuilderState.syncWidgetAndOverlay (package:showcaseview/layout_overlays.dart:183:7)
#5 _OverlayBuilderState.reassemble. (package:showcaseview/layout_overlays.dart:137:57)
#6 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1117:15)
#7 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1063:9)
#8 SchedulerBinding.scheduleWarmUpFrame. (package:flut<…>

Additional context

From the error message we can see something wrong with showcaseview overlay, but I can't find ways to solve it. (I have searched on google and stackoverflow, but no results.

I closely followed the example code and also searched on other use case to apply this plugin, my code is similar like this one: https://stackoverflow.com/questions/60930636/how-can-i-use-show-case-view-in-flutter

The plugin is working (although it's not working as I expected, that can be feature suggestions, but as least it's working as the example shows). However I always get this error complain every time I start or hot reload.

When I remove all the code related with this plugin, I don't get any error complain, so it's definitely the plugin issue.

How can I solve this? does any of other people get same error like i do? is it something wrong with the plugin? thank you!

I am using the latest version of flutter and the plugin, every thing's version is the latest, I always upgrade as soon as I can.

@Purus
Copy link

Purus commented Oct 25, 2020

I can confirm on the same too.

@jlepocher
Copy link

I get the same error on hot reload too.

@leidig54
Copy link

same again on hot reload and hot restart

@dukaric1991
Copy link

same here...

@nullbytesoftware
Copy link

same. Any fix?

@abdimussa87
Copy link

Same here, please provide a fix

@ManojDvs
Copy link

is there any fix for this ?

@vatsaltanna
Copy link
Collaborator

Hello Guys, is this issue still reproducible? if yes please share the code snippet of the use in your project.

@vatsaltanna vatsaltanna added the more-info-required Provide more information label Jun 25, 2021
@alirezava
Copy link

Hello Guys, is this issue still reproducible? if yes please share the code snippet of the use in your project.

Hi @vatsaltanna this is still reproducible. Would you like me to send a snippet?

@ParthBaraiya
Copy link
Contributor

Hello, guys if this is still reproducible. Please share the snippet.

@vatsaltanna
Copy link
Collaborator

This issue seems to be solved in latest version of showcaseview. Closing this for now, feel free to reopen this if issue still persist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-info-required Provide more information
Projects
None yet
Development

No branches or pull requests