Flutter SDK

Integrate LiteP2P into Flutter apps with a simple Dart API and native platform acceleration where available.

Install

flutter pub add litep2p

Initialize

// pseudo Dart
final config = PeerConfig(appId: 'your-app-id');
final p2p = LiteP2P(config);
await p2p.connect();

Send/receive messages

p2p.onMessage((msg) {
  if (msg.channel == 'chat') {
    // handle
  }
});

await p2p.send(peerId, data, channel: 'chat');

Next steps