dart_mc_ping 1.0.10

  • Readme
  • Changelog
  • Example
  • Installing
  • 77

Dart Minecraft ping #

A Dart implementation of the Minecraft ping protocol

https://pub.dev/packages/dart_mc_ping

Usage #

import 'package:dart_mc_ping/dart_mc_ping.dart';

final statusResponse = await ping('play.hivemc.com');
print('${statusResponse.ms} ms'); // 28ms
print(statusResponse.description.toColoredString()); // MOTD with ANSI colors and format

[1.0.10] - 01/05/2020 #

  • Fix NPE when favicon is not provided

[1.0.9] - 01/05/2020 #

  • Handle line return in base64 image

[1.0.8] - 27/04/2020 #

  • Added color hexadecimal value

[1.0.7] - 26/04/2020 #

  • Minor fix

[1.0.6] - 26/04/2020 #

  • Minor fix

[1.0.5] - 26/04/2020 #

  • Minor fix

[1.0.4] - 26/04/2020 #

  • Standardize color and text formatter
  • Support printing the server MOTD in the console with colors

[1.0.3] - 17/04/2020 #

  • Minor fix

[1.0.2] - 17/04/2020 #

  • Minor fix

[1.0.1] - 17/04/2020 #

  • Minor fix

[1.0.0] - 17/04/2020 #

  • Initial release

example/main.dart

import 'package:dart_mc_ping/dart_mc_ping.dart';

void main() async {
  final statusResponse = await ping('play.hivemc.com');
  print('${statusResponse.ms} ms'); // 28ms
}

Use this package as a library

1. Depend on it

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


dependencies:
  dart_mc_ping: ^1.0.10

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:dart_mc_ping/dart_mc_ping.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
54
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
77
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.15

Analysis suggestions

Package not compatible with runtime flutter-web on Web

Because:

  • package:dart_mc_ping/dart_mc_ping.dart that imports:
  • package:dart_mc_ping/dart_mc_client.dart that imports:
  • dart:io

Package not compatible with runtime js

Because:

  • package:dart_mc_ping/dart_mc_ping.dart that imports:
  • package:dart_mc_ping/dart_mc_client.dart that imports:
  • dart:io

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
colorize ^2.0.0 2.0.0
fixnum ^0.10.11 0.10.11
logging ^0.11.4 0.11.4
raw ^0.2.0 0.2.0
Transitive dependencies
collection 1.14.13 1.15.0-nullsafety
matcher 0.12.8
meta 1.2.2 1.3.0-nullsafety
path 1.7.0
stack_trace 1.9.5
Dev dependencies
test ^1.9.4