LocationExt extension
An extension on the Location class that provides convenient
conversion methods between the Google Maps API Location model
and Flutter's LatLng type or coordinate lists.
This helps to easily convert location data retrieved from
Google Maps responses into formats usable by the google_maps_flutter package.
- on
Methods
-
toCoordinates(
{bool reverse = false}) → List< double> -
Available on Location, provided by the LocationExt extension
Converts the current Location object into a list of coordinates[lat, lng]. -
toLatLng(
{bool reverse = false}) → LatLng -
Available on Location, provided by the LocationExt extension
Converts the current Location object into aLatLnginstance.