getOctetsOfIpAddress method

List<int> getOctetsOfIpAddress(
  1. String ipAddress
)

Implementation

List<int> getOctetsOfIpAddress(String ipAddress) {
  List<int> octets = List<int>.empty(growable: true);
  ipAddress.split('.').forEach((octet) => octets.add(int.parse(octet)));
  return octets;
}