-
Notifications
You must be signed in to change notification settings - Fork 39
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] overlayBuilder race condition? #23
Comments
flutter_intro/example/lib/demo_usage.dart Lines 52 to 69 in f1ad3a9
Hello, it can be triggered in the |
Thank you for sharing this. The guide started properly, but steps 2 and 3 weren't loaded yet and did not show. I kept a |
This seems to be a bug. Could you provide me with a minimal reproducible demo? |
I will try, but it might be a few days. |
https://github.com/EnduringBeta/flutter-bug/tree/flutter_intro 💪 I've managed to make a tiny app that has the bug. 🐛 I think this has to do with Run this, and then tap the "Refresh" icon button in the top left. This will take you to the test route, where there are 2 intro steps, but only 1 will show (only the first time). In the code, change My function Edit: I changed the issue title |
Thanks for the bug reproduction case! I checked it out, and yeah, there is an issue, but it's not super easy to fix. However, there's a pretty straightforward workaround what I mentioned earlier about calling start in the I'll keep thinking about how to solve this issue without causing any breaking changes. Also, what you mentioned earlier about using |
Unfortunately, for my case, my last step is the "Back" button up in the app bar. So your assumption about "all elements being fully loaded" may not be true for me? I'm not expecting a fix for this. I'm doing fine with what I have. Often developers would know how many intro steps there will be on a route, I think? Could there be a At the very least, you can update the docs to share this bug/limitation so people are aware. |
Thank you for creating this package. I want to suggest that the documentation explain how best to show an intro on route load.
I tried to simply call
Intro.start()
in aaddPostFrameCallback
ininitState
for my route, but the intro didn't show reliably. I guessed a race condition, and I think I'm right._IntroStepBuilderState
and perhaps other places useaddPostFrameCallback
to build_stepsMap
.Once I added a
Future.delayed()
of 10ms, the guide shows reliably.Is there a better technique? If not, this being in the readme would be helpful, I think.
The text was updated successfully, but these errors were encountered: