-
-
Notifications
You must be signed in to change notification settings - Fork 860
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] Map fails to reinitialize while in ListView #1288
Comments
I think mapController is disposed of ok... However, I suspect removing |
As this as now had two reports, I'm going to remove the 'needs verification' label. If you can try @ibrierley's suggestion @Zverik, that would be great :) |
I think @ibrierley's suggestion does not make sense, because it's the final field initializing in
It can be fixed by removing the |
(Not sure if you meant it makes sense or doesn't make sense). However, I don't necessarily think it makes sense either way, even if it works :D. That's why I mentioned the implications. The preferred way I guess would be to use your own mapController. I suspect the problem with removing final, is maybe it stops one error, but previously I think the mapState was disposed (I assume)...are those disposed elements (any streams etc) reinstated, or is it in a slightly broken state, because other things weren't handled ? Do MapEvents and things like that still work correct... |
Yeah it appears streams are still broken. I made a review on #1293 with a screenshot of the issue. |
* Fix late initialization error, see #1288 * Rework mapController life cycle * Run dart format on changed files * Add const modifier to the constructor
When you put the
FlutterMap
inside aListView
, it can be hidden and then added anew. And it fails, because it sets a new state for a map controller, which is already initialized. Testing code is below: it adds 30 lines of text after the map. Scroll down and then back up again to see the error.Mapybe mapController needs to be disposed properly?
Flutter_map 1.1.0, Flutter 3, Dart 2.17.
The text was updated successfully, but these errors were encountered: