tryParse static method

IPv6Interface? tryParse(
  1. String addr
)

Creates a new IPv6Interface. Like constructor except that this function returns null.

Implementation

static IPv6Interface? tryParse(String addr) {
  if (addr.isEmpty) return null;
  try {
    return IPv6Interface(addr);
  } catch (e) {
    return null;
  }
}