Untitled
unknown
dart
4 years ago
799 B
4
Indexable
Future<void> getAddress(bool twoPoints) async { if (!twoPoints) { await reverseGeocodingSearch( address.LatLon(_originLatitude, _originLongitude)) .then((value) { setState(() { startAddress = value[0].formattedAddress; destinationAddress = ""; }); }); } else { await reverseGeocodingSearch( address.LatLon(_originLatitude, _originLongitude)) .then((value) { setState(() { startAddress = value[0].formattedAddress; }); }); await reverseGeocodingSearch( address.LatLon(_destLatitude, _destLongitude)) .then((value) { setState(() { destinationAddress = value[0].formattedAddress; }); }); } }
Editor is loading...