I have Latlong Google Maps Flutter response like this:
I/flutter (21690): [LatLng(-6.435887849941857, 106.85601130127908), LatLng(-6.4333171563046, 106.85805916786194), LatLng(-6.434791741881702, 106.8591035529971), LatLng(-6.436753407158089, 106.85817148536444)]
I want to convert and split like this:
[ [ -6.435887849941857, 106.85601130127908 ],[ -6.4333171563046, 106.85805916786194 ],[ -6.434791741881702, 106.8591035529971 ],[ -6.436753407158089, 106.85817148536444 ] ]
Thanks for all comments.
The easiest way thank to pskink is mapping:
the other solutions:
You can loop in your list and add to new list:
or
forEach
instead: