getAddressByAddress method
dynamic
getAddressByAddress(
- String address
)
Get address by text
Implementation
getAddressByAddress(String address) async {
_progress.sink.add(true);
try {
final resp = await Dio().get(_replaceIt(
text: _URL_ADDRESS + _getExtraArgs(),
remove: {'[ADDRESS]': address.toString()}));
goTo(_extractLatLng(resp));
_address.sink.add(MPAddress(
formattedAddress: _extractAddress(resp),
latLng: _extractLatLng(resp)));
} catch (msg) {
_address.sink.add(MPAddress(formattedAddress: theme.errorToFindAddress));
_hasError = true;
}
_progress.sink.add(false);
}