Flutter SDK
Let's explore how to make a simple SendingNetwork client with the ability to sync messages, create a chat room, and post messages in the room.
When you complete this quickstart, you’ll have a fully running application that can send and receive messages on a demo app. To integrate and initialize SDK written in Dart, follow these steps:
1 Get the code
https://github.com/Sending-Network/sendingnetwork-dart2 Configure the wallet address and private key
String privKey wallet private Private key";
String addressHexAll = "wallet address";3 Configure the dependencies in your pubspec.yaml file
Add the following dependencies in the same directory:
sendingnetwork_flutter_demo
sendingnetwork_dart_sdk
sendingnetworkdart_api_liteIn the same pubspec.yaml file, include sendingnetwork_dart_sdk as a local path dependency:
sdn_api_lite:
path: ../sendingnetworkdart_api_lite
Similarly, include sendingnetwork_flutter_demo as a local path dependency:4 Import the SDK:
5 import package:sdn/sdn.dart;
package:sdn/sdn.dart;Create a client and provide the server domain:
6 Run the demo:
By running the demo, you should be able to log in, create rooms, and send messages. You will be able to see rooms created on other platforms that have integrated with SendingNetwork as well.
Last updated