addPolylines method
Adds multiple lines to the map, configured using the specified custom options
.
Change listeners are notified once the lines have been added on the platform side.
The returned Future completes with the added line once listeners have been notified.
Implementation
Future<List<Line>> addPolylines(List<PolylineOptions> options,
[List<Map>? data]) async {
final lines = [
for (var i = 0; i < options.length; i++)
Line(getRandomString(),
PolylineOptions.defaultOptions.copyWith(options[i]), data?[i])
];
await polylineManager!.addAll(lines);
notifyListeners();
return lines;
}