isIPv4 method Null safety

bool isIPv4(
  1. String s
)

Checks if string is IPv4.

Implementation

static bool isIPv4(String s) =>
    hasMatch(s, r'^(?:(?:^|\.)(?:2(?:5[0-5]|[0-4]\d)|1?\d?\d)){4}$');