분류, 패키지 및 저장소 검색

패키지 상세v1.0.1+5

flutter_whatsapp_stickers

Flutter 앱 내에서 WhatsApp 스티커를 추가하기 위한 플러터 플러그인입니다.

Android
30일 다운로드
8
좋아요
61
Pub 점수
145

패키지 설치

flutter pub add flutter_whatsapp_stickers

패키지 개요

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

Flutter 애플리케이션 내에서 직접 WhatsApp 스티커를 통합할 수 있는 플러터 플러그인입니다. 사용자는 WhatsApp을 통해 맞춤형 스티커를 만들고 관리하며 공유할 수 있으며, 표현력 있는 시각적 요소로 채팅 경험을 향상시킵니다. 이 플러그인은 Android 전용으로 설계되었으며, 스티커 팩과 그 메타데이터를 처리하기 위한 간단한 API를 제공합니다. WhatsApp 스티커 형식 요구 사항을 지원하여, Flutter 앱 내에서 스티커를 패키지화하고 배포하는 것을 쉽게 만듭니다.

사용 사례

  • WhatsApp 채팅에서 사용자 지정 스티커 공유하기
  • 메시징 앱에 스티커 팩 통합하기
  • 사용자 생성 스티커 콘텐츠 활성화
  • 앱에 상호작용 스티커 기능 추가하기
  • 브랜드 스티커 컬렉션 만들기

주요 기능

  • 안드로이드 전용 지원
  • 스티커 팩 관리를 위한 간단한 API
  • WhatsApp 스티커 형식을 지원합니다
  • Flutter 앱과의 간편한 통합
  • 메타데이터 및 이미지 자산을 처리합니다

적합한 대상

  • 메시징 앱을 개발하는 개발자
  • 사용자 생성 콘텐츠에 중점을 둔 앱
  • 브랜드 스티커 배포 플랫폼
  • 스티커 디자인을 위한 크리에이티브 도구
  • Android 중심의 Flutter 애플리케이션

고려 사항

  • Android 플랫폼에 한정
  • WhatsApp 스티커 사양 준수 필요
  • iOS 지원 없음
  • 스티커 팩은 올바르게 형식화되어야 합니다
  • 추가 자산 처리가 필요할 수 있습니다

원본 README

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

WhatsApp Stickers plugin for Flutter

pub package

This plugin is still under development and for now, only Android is supported. Feedback and Pull Requests are welcome!

I'm in the process of rebuilding this plugin and the new version will be released at the end of October 🤞

Getting Started

Add flutter_whatsapp_stickers as a dependency in your pubspec.yaml file.

Check out the example directory for a sample app.

Android Configuration

Add the following option to your app\build.gradle file. This will prevent all WebP files from being compressed.

android {
    aaptOptions {
        noCompress "webp"
    }
}
Packaged Assess

You need to include your assets in your pubspec.yaml file.

flutter:
  assets:
    - sticker_packs/sticker_packs.json
    - sticker_packs/1/
Dynamic Content

If you are using assets that are not bundled in your build, then you need to add the following to your Manifest file. Note that you cannot use both.

<meta-data android:name="NonAssetContentProvider" android:value="true" />
Sticker Pack Contents File

To change the stickers packs file, add this Build Config Field to your app\build.gradle file. The default is sticker_packs.json.

buildConfigField("String", "STICKER_PACK_FILE", "\"sticker_packs.json\"")

iOS Integration

Currently, there is no iOS support. Pull requests for this are more than welcome for this.

Methods

Check if WhatsApp is installed.

bool whatsAppInstalled = await WhatsAppStickers.isWhatsAppInstalled;

Check if the WhatsApp Consumer package is installed

bool whatsAppConsumerAppInstalled = await WhatsAppStickers.isWhatsAppConsumerAppInstalled;

Check if the WhatsApp Business package app is installed

bool whatsAppSmbAppInstalled = await WhatsAppStickers.isWhatsAppSmbAppInstalled;

Check if a sticker pack is installed.

_stickerPackInstalled = await WhatsAppStickers().isStickerPackInstalled(_stickerPackIdentifier);

Add a sticker pack to WhatsApp.

WhatsAppStickers().addStickerPack(
  packageName: WhatsAppPackage.Consumer,
  stickerPackIdentifier: _stickerPackIdentifier,
  stickerPackName: _stickerPackName,
  listener: _listener,
);

Updated Sticker Pack contents and notify listeners

WhatsAppStickers().updatedStickerPacks(_stickerPackIdentifier);

The Add Sticker Pack Listener

Future<void> _listener(StickerPackResult action, bool result, {String error}) async {
    // Do what you must here
}

Here is an example of how to create a custom stickers_packs.json file.

void createLocalFile() async {
  String dir = (await getApplicationDocumentsDirectory()).path;
  Directory stickersDirectory = Directory("$dir/sticker_packs");
  if (!await stickersDirectory.exists()) {
    await stickersDirectory.create();
  }

  File jsonFile = File('$dir/sticker_packs/sticker_packs.json');
  String content = jsonEncode(stickerPacks);
  jsonFile.writeAsStringSync(content);
}

카테고리

의존성

의존성 목록 2 개

소스 저장소

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

아직 데이터가 없습니다.