ip 0.1.1

Pub Package

Introduction #

A Dart package for working with the IP protocol stack. Licensed under the MIT License.

Features #

Encodes and decodes:

  • IPv4
  • IPv6
  • ICMP
  • TCP
  • UDP


import 'package:ip/ip.dart';
import 'package:raw/raw.dart';

void printPacketInfo(List<int> bytes) {
  // Decode packet
  final reader = RawReader.withBytes(bytes);
  final packet = IpPacket.decode(reader);

  // Print some information
  print("Source: ${packet.source}");
  print("Destination: ${packet.destination}");

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  ip: ^0.1.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:ip/ip.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 16, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Fix lib/src/ip/ip6_address.dart. (-1 points)

Analysis of lib/src/ip/ip6_address.dart reported 2 hints:

line 79 col 9: Don't explicitly initialize variables to null.

line 83 col 9: Don't explicitly initialize variables to null.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
meta ^1.0.0 1.1.8
raw ^0.2.0 0.2.0
Transitive dependencies
collection 1.14.12
fixnum 0.10.11
matcher 0.12.6
path 1.6.4
stack_trace 1.9.3
Dev dependencies
pedantic ^1.0.0
test ^1.4.0