-
-
Notifications
You must be signed in to change notification settings - Fork 871
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] Polygon
s and Polyline
s don't update when points
modified
#1894
Comments
This issue is occuring because the equality checking for elements is not working correctly. |
Then maybe when overriding "=" operator of Polygon object, you should check manually? Not using listEquals function. |
It's not due to that. Its because the list instance is shared, so the list on the |
I generally wouldn't recommend doing what you're doing. Instead, use final coordinates = <List<LatLng>>[...];
// inside `build`
PolygonLayer(
polygons: coordinates.map((c) => Polygon(points: c)).toList(),
), |
Polygon
s and Polyline
s don't update when points
modified
What is the bug?
After adding new points to polygon, it's not updating automatically. You should explicitly add UniqueKey to Polygon widget.
How can we reproduce it?
To reproduce you can view min sample in github. To solve you can uncomment "// key: UniqueKey()," part in map_page.dart file
Do you have a potential solution?
No
Platforms
All
Severity
Obtrusive: Prevents normal functioning but causes no errors in the console
The text was updated successfully, but these errors were encountered: