zeronet_ws 0.0.8 copy "zeronet_ws: ^0.0.8" to clipboard
zeronet_ws: ^0.0.8 copied to clipboard

ZeroNet(X) WebSocket Package to use ZeroNet API via Websockets in your dart program.

example/main.dart

import 'package:zeronet_ws/zeronet_ws.dart';

main(List<String> args) async {
  await ZeroNet.instance.connect('1HELLoE3sFD9569CLCbHEAVqvqV7U2Ri9d');
  var infoMsg = await ZeroNet.instance.siteInfoFuture();
  assert(infoMsg.cmd == 'siteInfo');
  assert(infoMsg.result != null);

  var annInfo = await ZeroNet.instance.announcerInfoFuture();
  assert(annInfo.cmd == 'announcerInfo');
  assert(annInfo.result != null);
}
0
likes
130
pub points
0%
popularity

Publisher

unverified uploader

ZeroNet(X) WebSocket Package to use ZeroNet API via Websockets in your dart program.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, flutter_web_plugins, http, js, plugin_platform_interface, web_socket_channel

More

Packages that depend on zeronet_ws