Flutter google maps , how to make a gradient in polylines?
If you are using google_maps_flutter package, it seems that the feature to add a gradient polyline is not yet available for this package as there's an existing feature request to support gradient colors to polyline/plolygons.
However, if you are using flutter_map package, perhaps you can try this.