-
Notifications
You must be signed in to change notification settings - Fork 456
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
Crash on hot reload #81
Comments
...solved fairly easily by wrapping the WidgetsBinding callback in a |
Thanks , we'll update sample accordingly in next release. |
I also have this problem: E/flutter ( 3726): [ERROR:flutter/shell/common/shell.cc(103)] Dart Unhandled Exception: This widget has been unmounted, so the State no longer has a context (and should be considered defunct).
E/flutter ( 3726): Consider canceling any active work during "dispose" or using the "mounted" getter to determine if the State is still active., stack trace: #0 State.context.<anonymous closure>
E/flutter ( 3726): #1 State.context
E/flutter ( 3726): #2 _OverlayBuilderState.addToOverlay
E/flutter ( 3726): #3 _OverlayBuilderState.showOverlay
E/flutter ( 3726): #4 _OverlayBuilderState.syncWidgetAndOverlay
E/flutter ( 3726): #5 _OverlayBuilderState.reassemble.<anonymous closure>
E/flutter ( 3726): #6 SchedulerBinding._invokeFrameCallback
E/flutter ( 3726): #7 SchedulerBinding.handleDrawFrame
E/flutter ( 3726): #8 SchedulerBinding.scheduleWarmUpFrame.<anonymous closure>
E/flutter ( 3726): #9 Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
E/flutter ( 3726): #10 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:395:19)
E/flutter ( 3726): #11 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:426:5)
E/flutter ( 3726): #12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
E/flutter ( 3726): I tried this: if (mounted)
WidgetsBinding.instance?.addPostFrameCallback((_) {
ShowCaseWidget.of(context)?.startShowCase(app.showcaseSettings.keys);
}); inside my build method but this keeps happening. I also tried placing it inside the initState function but this error also appears. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Showcase View is causing hot reload to crash the app.
To Reproduce
Steps to reproduce the behavior:
iOS and android. Simulator and physical devices.
I'm not sure what to make of this. Does anyone have a good way of implementing the "mounted" feature mentioned in the exception? I have implemented the ShowCaseWidget like so...
The text was updated successfully, but these errors were encountered: