Commit 5fe7ab2b authored by Yasiru-Deshan's avatar Yasiru-Deshan

Polyline function added

parent 5fcaf0d9
......@@ -51,6 +51,16 @@ class MapSampleState extends State<MapSample> {
position: LatLng(37.43296265331129, -122.08832357078792),
);
static final Polyline _kPolyline = Polyline(
polylineId: PolylineId('_kPolyline'),
points:[
LatLng(37.42796133580664, -122.085749655962),
LatLng(37.43296265331129, -122.08832357078792),
],
width: 5,
);
@override
Widget build(BuildContext context) {
return Scaffold(
......@@ -59,6 +69,9 @@ class MapSampleState extends State<MapSample> {
markers: {_kGooglePlexMarker,
_kLakeMarker,
},
polylines:{
_kPolyline,
},
initialCameraPosition: _kGooglePlex,
onMapCreated: (GoogleMapController controller) {
_controller.complete(controller);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment