isValidAddress static method

Future<bool> isValidAddress(
  1. String address
)

Check if an address string is valid

Implementation

static Future<bool> isValidAddress(String address) async {
  try {
    final locations = await locationFromAddress(address);
    return locations.isNotEmpty;
  } catch (_) {
    return false;
  }
}