searchLocation method

Future<List<Location>> searchLocation(
  1. String address
)

Implementation

Future<List<Location>> searchLocation(String address) async {
  try {
    final List<Location> result = await locationFromAddress(address,
        localeIdentifier: KpostalConst.localeKo);
    log('LatLng Found from "$address"', name: KpostalConst.packageName);
    return result;
  }
  // 경위도 조회 결과가 없는 경우
  on NoResultFoundException {
    log('LatLng NotFound from "$address"', name: KpostalConst.packageName);
    return <Location>[];
  } catch (_) {
    return <Location>[];
  }
}