패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.2.0

whatsapp_sender_flutter

WhatsApp Sender Flutter는 Flutter용 비공식 API로, WhatsApp에 대량 메시지를 보낼 수 있습니다

macOSWindowsLinux
30일 다운로드
45
좋아요
31
Pub 점수
125

패키지 설치

flutter pub add whatsapp_sender_flutter

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

WhatsApp Sender Flutter는 개발자가 프로그래밍 방식으로 대량의 WhatsApp 메시지를 보내는 데 도움을 주는 비공식 Flutter 패키지입니다. 브라우저 자동화를 통해 WhatsApp 웹 API와 통합되어 공식 WhatsApp API 접근 없이도 메시지 전송이 가능합니다. macOS, Windows, Linux 등의 데스크톱 플랫폼에 최적화되어 있으며, 자동 알림, 리마인더 또는 마케팅 캠페인 등에 유용합니다. 패키지 사용에는 수동 설정이 필요하며 활성화된 WhatsApp 웹 세션에 의존합니다. 기능상 문제는 없지만 공식 WhatsApp 지침 외부에서 작동하므로 계정 정지 위험이 있을 수 있습니다.

사용 사례

  • 대량 알림 시스템
  • 자동 알림
  • 마케팅 캠페인 도구
  • 고객 연락
  • 이벤트 초대

주요 기능

  • 대량 메시지 전송
  • 데스크톱 플랫폼 지원
  • 브라우저 자동화 백엔드
  • Flutter와의 간단한 통합
  • 세션 지속성

적합한 대상

  • 데스크톱 앱을 개발하는 개발자
  • 대량 메시징이 필요한 팀
  • 비상업적 자동화 프로젝트
  • WhatsApp 통합 프로토타이핑

고려 사항

  • 비공식 API 사용
  • 계정 정지 위험
  • 수동 세션 설정이 필요합니다
  • 데스크톱 플랫폼에 한정
  • 공식 WhatsApp 지원 없음

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

WhatsApp Sender Flutter

pub package pub points pub popularity pub likes

WhatsApp Sender Flutter is an unofficial API for Flutter to send bulk messages in Whatsapp. It's not recommended using it in your company or for marketing purpose.

Buy Me A Book

Thanks to rohitsangwan01 for reference!

Getting Started

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  whatsapp_sender_flutter: latest

Import it:

import 'package:whatsapp_sender_flutter/whatsapp_sender_flutter.dart';

Configuration

For the first usage, wait for the automatic download of the .local-chromium folder in your project root. Without this folder the package will not work,this is because this package is based on puppeteer.

Basic usage

The process for sending messages is like for WhatsApp Web:

  1. Scan the qr code
  2. Start the sending
Send text message

After you have scanned the code, you can start the sending campaign.

All phones must contain the international prefix!

   await WhatsAppSenderFlutter.send(
         phones: [ "391111111", "391111111", "391111111"],
         message: "Hello",
   );
Send file message

After you have scanned the code, you can start the sending campaign.

All phones must contain the international prefix!

   await WhatsAppSenderFlutter.send(
         phones: [ "391111111", "391111111", "391111111"],
         message: "Hello",
         file: File("path-to-file.pdf"),
   );
Listen changes

New functions for listen changes:

  1. onEvent(WhatsAppSenderFlutterStatus status), usethis function to listen the sending status
  2. onQrCode(String qrCode), use this function to intercept the qrCode
  3. onSending(WhatsAppSenderFlutterCounter counter), use this function to count the number of successful or unsuccessful submissions.
  4. onError(WhatsAppSenderFlutterErrorMessage errorMessage), use this feature to catch errors while sending
   await WhatsAppSenderFlutter.send(
        phones: [ "391111111", "391111111", "391111111"],
        message: "Hello",
        file: File("path-to-file.pdf"),
        onEvent: (WhatsAppSenderFlutterStatus status) {
          print(status);
        },
        onQrCode: (String qrCode) {
          print(qrCode);
        },
        onSending: (WhatsAppSenderFlutterCounter counter) {
          print(counter.success.toString());
          print(counter.fails.toString());
        },
        onError: (WhatsAppSenderFlutterErrorMessage errorMessage) {
          print(errorMessage);
        },
   );

To know in detail the possible states of WhatsAppSenderFlutterStatus, WhatsAppSenderFlutterCounter, WhatsAppSenderFlutterErrorMessage read documentation

Save your session
   await WhatsAppSenderFlutter.send(
         phones: [ "391111111", "391111111", "391111111"],
         message: "Hello",
         savedSessionDir: "./userData"
   );

To save the session you must indicate a folder name in savedSessionDir.

If you save the session you will no longer have to scan the qr code !

Do not indicate savedSessionDir if you want to be asked to scan the qr code at each sending.

To Do

  • Send text message ✔️
  • Multi session support ✔️
  • Send files ✔️
  • Native mobile support (Android, IOS)

License

MIT

카테고리

의존성

의존성 목록 2 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.