verifyAsIpAddress method

bool verifyAsIpAddress(
  1. String host
)

Implementation

static bool verifyAsIpAddress(String host) {
  return RegExp('([0-9a-fA-F]*:[0-9a-fA-F:.]*)|([\\d.]+)')
          .stringMatch(host) ==
      host;
}