tryParse static method

IPv6Network? tryParse(
  1. String addr,
  2. {bool strict = true}
)

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

Implementation

static IPv6Network? tryParse(String addr, {bool strict = true}) {
  if (addr.isEmpty) return null;
  try {
    return IPv6Network(addr, strict: strict);
  } catch (e) {
    return null;
  }
}