-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Hot reload cannot recover from sliver error #133532
Comments
Thanks for the report @mattermoran
This may not be an ideal implementation, ie, to have a non-sliver widget inside a sliver widget. If you are using If in your case, you used a non-sliver, ie,
So the solution you mentioned, to wrap non-sliver with |
Hey @darshankawar The issue is not that Basically what I'm saying is that I would the error to go away after fixing the mistake without having to restart the app. |
Thanks for the feedback. I do see the same reported behavior using latest stable and master versions.
Upon wrapping
Whereas, the expected behavior per OP is hot reload shouldn't throw above error and currently need to hot restart the app. Maybe related ? #94416 stable, master flutter doctor -v
|
cc'ing team-tool, not sure if we can gracefully recover this case through hot reload. |
@Piinks is the assertion happening after the hot reload, on the second build? |
Yeah. So on the first build it throws because the child is the wrong type, and then changing the child to the right type and hot reloading is where is fails to recover. |
(package:flutter/src/widgets/framework.dart:5016:7) |
Is there an existing issue for this?
Steps to reproduce
CustomScrollView
Container
SliverToBoxAdapter
Expected results
The error disappears and can continue coding as usual
Actual results
The error keeps saying
Failed assertion: line 6426 pos 12: 'child == _child': is not true.
and does not go away until hot restart.Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
Untitled.1.mp4
Logs
Logs
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: