dart_ping 1.0.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 79

dart-ping #

This tool allows to send pings via Dart program. It uses built-in command ping and parses output of this commands. It properly handles *nix systems and Windows.

Documentation #

Future<Stream<PingInfo>> ping(String address, {int times = 4, int packetSize = 64, int interval = 1})

  • adress - address of remote host to ping. Can be domain name (google.com) or ip address (127.0.0.1)
  • times - how many ping will be sent
  • packetSize - size of packet in bytes
  • interval - interval between ping
var pings = await ping('google.pl');

pings.listen((ping) {
  print(ping.time.inMilliseconds);
});

1.0.0 #

  • Initial version, created by Stagehand

example/dart_ping_example.dart

import 'package:dart_ping/dart_ping.dart';

main() async {
  var stream = await ping("google.com", times: 5);

  print("Pinging google.com");
  stream.listen((d) {
    print(d.time.inMilliseconds);
  });
}

Use this package as a library

1. Depend on it

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


dependencies:
  dart_ping: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:dart_ping/dart_ping.dart';
  
Version Uploaded Documentation Archive
1.0.0 Oct 26, 2018 Go to the documentation of dart_ping 1.0.0 Download dart_ping 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
75
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
79
Learn more about scoring.

We analyzed this package on Apr 4, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, other

Primary library: package:dart_ping/dart_ping.dart with components: io.

Health suggestions

Format lib/src/dart_ping_base.dart.

Run dartfmt to format lib/src/dart_ping_base.dart.

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://github.com/l7ssha/dart-ping was unreachable.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0