ping function Null safety

Future<ResponsePacket?> ping(
  1. String serverUri,
  2. {int port = 25565,
  3. Duration timeout = const Duration(seconds: 30)}
)

Ping a single server. port will default to 25565 as that is the default Minecraft server port. This method is for post 1.6 servers.

Implementation

Future<ResponsePacket?> ping(String serverUri,
    {int port = 25565, Duration timeout = const Duration(seconds: 30)}) async {
  throw UnsupportedError('dart:io is required to ping servers.');
}