fleaflet / flutter_map

A versatile mapping package for Flutter. Simple and easy to learn, yet completely customizable and configurable, it's the best choice for mapping in your Flutter app.
https://pub.dev/packages/flutter_map
BSD 3-Clause "New" or "Revised" License
2.68k stars 848 forks source link

feat: allow reassignment of `MapController` to `FlutterMap` multiple times #1915

Closed josxha closed 5 days ago

josxha commented 3 weeks ago

Description

Allows the MapController to get assigned multiple times to a view (only one a every time). Can't tell much about potential side effects. Did some quick tests and everything worked alright so far but additional testing would be good.

Issue

pagetronic commented 1 week ago

Perfect for me.

josxha commented 5 days ago

Tbh I'm not 100% confident that all of the users experiencing this issue are using the MapController as per the documentation in the first place, especially when external state is involved

Yes, I agree. All the reported issues that I've seen on this were caused by incorrect usage of the MapController. But anyways, now we have unofficial support for those implementations. 👍

Thanks for the code review (: