isIPv4 property

bool get isIPv4

Checks if string is IPv4.

Implementation

bool get isIPv4 => matchesRegex(r'^(?:(?:^|\.)(?:2(?:5[0-5]|[0-4]\d)|1?\d?\d)){4}$');