whatsapp_client 0.0.2
whatsapp_client: ^0.0.2 copied to clipboard
A Whatsapp Client with native websocket and puppeter support.
Whatsapp client #
Whatsapp client menggunakan bahasa code dart bisa berjalan menggunakan puppeteer / native websocket (tanpa puppeteer) dan support multi client tested di bawah
Screenshot #

To-Do #
- ✅ Multi Client
- ❌ Native protocol Websocket
- ✅ Pupeteer
- ❌ Auto Login Session Puppeteer
- ❌ Make Standar api method
install #
dart pub add whatsapp_client
import library #
import 'package:whatsapp_client/whatsapp_client.dart';
QuickStart #
// ignore_for_file: non_constant_identifier_names
import 'package:whatsapp_client/whatsapp_client.dart';
import 'dart:io';
import "package:whatsapp_client/scheme/update/raw_message.dart" as wa_scheme_raw_message;
void main(List<String> args) async {
WhatsApp wa = WhatsApp();
wa.on(wa.event_data_update, null, (update) async {
try {
if (update is Map) {
if (update["@type"] == "updateAuthorization") {
print(update);
if (update["authorization"] is Map) {
Map authorization = update["authorization"];
if (authorization["@type"] == "authQrCode") {
String qr_data = authorization["data"];
File fileOutPut = File("./qr_code.png");
await WhatsAppQr.encode(text: qr_data, fileOutPut: fileOutPut, padding: 10);
}
}
}
if (update["@type"] == "updateNewMessage") {
wa_scheme_raw_message.UpdateNewMessage updateNewMessage = wa_scheme_raw_message.UpdateNewMessage(update);
print(updateNewMessage.toString());
}
}
} catch (e) {
print(e);
}
});
await wa.initIsolate(); // add this for create new client
print("init isolate");
}
Credit #
- whatsapp Bot Flutter Original code