isIPv6Address function

bool isIPv6Address(
  1. String? host
)

Returns true if is a IPv6 address.

Implementation

bool isIPv6Address(String? host) {
  if (host == null) return false;
  return _regexpIpv6.hasMatch(host) ||
      host == '::/0' ||
      host == '0000:0000:0000:0000:0000:0000:0000:0000';
}