isValidIpAddress static method

bool isValidIpAddress(
  1. String ipAddress
)

Returns true if the given ipAddress conforms to the proper regex pattern.

Regex pattern ^(?:\d{1,3}\.){3}\d{1,3}$

Implementation

static bool isValidIpAddress(String ipAddress) =>
    RegExp(r"^(?:\d{1,3}\.){3}\d{1,3}$").hasMatch(ipAddress);