isIPv6 property

bool get isIPv6

Returns true if this is a valid IPv6 address.

Implementation

bool get isIPv6 => RegExp(
      r'^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::1|::)$',
    ).hasMatch(this);