PolygonController constructor
PolygonController({
- required Polygon polygon,
- bool consumeTapEvents = false,
- VoidCallback? onTap,
- void onEdited()?,
Creates a PolygonController that wraps a gmaps.Polygon object and its onTap behavior.
Implementation
PolygonController({
required gmaps.Polygon polygon,
bool consumeTapEvents = false,
VoidCallback? onTap,
void Function(List<gmaps.LatLng> points, List<List<gmaps.LatLng>> holes)?
onEdited,
}) : _polygon = polygon,
_consumeTapEvents = consumeTapEvents {
if (onTap != null) {
_subscriptions.add(
polygon.onClick.listen((gmaps.PolyMouseEvent event) {
onTap.call();
}),
);
}
if (onEdited != null) {
_listenToPathEdits(polygon, onEdited);
}
}