isIP function

bool isIP(
  1. String value,
  2. String type
)

Implementation

bool isIP(String value, String type) {
  final typeInt = type == 'v4'
      ? 4
      : type == 'v6'
          ? 6
          : 0;
  return validators.isIP(value, typeInt);
}