whatsapp_client 0.0.2 copy "whatsapp_client: ^0.0.2" to clipboard
whatsapp_client: ^0.0.2 copied to clipboard

discontinued
outdated

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 #

photo_2022-10-26_17-10-27 photo_2022-10-26_20-22-35

To-Do #

  1. ✅ Multi Client
  2. ❌ Native protocol Websocket
  3. ✅ Pupeteer
  4. ❌ Auto Login Session Puppeteer
  5. ❌ 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 #

  1. whatsapp Bot Flutter Original code
0
likes
0
points
13
downloads

Publisher

unverified uploader

Weekly Downloads

A Whatsapp Client with native websocket and puppeter support.

Homepage

License

unknown (license)

Dependencies

galaxeus_lib, image, puppeteer, zxing2

More

Packages that depend on whatsapp_client