Polyline Builder

Widget to get polyline from mapbox to be used on google map widget

PolylineBuilder.MAPBOX_ACCESS_TOKEN = "<MAPBOX ACCESS TOKEN HERE>";
...
GoogleMapController controller;
...
PolylineBuilder(
    builder: (polylines) => GoogleMap(
        mapType: MapType.normal,
        initialCameraPosition: _initialPosition,
        polylines: polylines,
        onMapCreated: (controller) =>
            setState(() => this.controller = controller)),
    locations: [
        LatLng(18.47790717495005, -69.96671598404646),
        LatLng(18.483361274620748, -69.87782824784517),
        LatLng(18.579517508133268, -69.8544293269515),
    ],
    // Used to fit polyline on map camera
    controller: this.controller,
)

You can see a complete sample in lib/polyline_builder_demo.dart file

Pre requisite

Follow google map instructions from HERE

Libraries

main
polyline_builder
polyline_builder_demo