Want to create circle on current location in flutter? This functionality is now available in the google_maps_flutter package: https://pub.dev/documentation/google_maps_flutter/latest/google_maps_flutter/Circle-class.html
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Set<Circle> circles = Set.from([Circle( circleId: CircleId(id), center: LatLng(latitude, longitude), radius: 4000, )]); GoogleMap( mapType: MapType.normal, myLocationEnabled: true, myLocationButtonEnabled: true, initialCameraPosition: initialMapLocation, onMapCreated: (GoogleMapController controller) { _controller.complete(controller); }, onCameraMove: null, circles: circles, ); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.