emoji_weixin

English | 简体中文

WeChat-style Flutter emoji/sticker panel package.

Requirements: Dart 3.12+ / Flutter 3.44+. Uses standalone material_ui (package:material_ui/material_ui.dart) instead of package:flutter/material.dart. Host apps should do the same; wrap unmigrated third-party Material widgets with MaterialUiCompatibilityBridge.

Features:

  1. Klipy online search — download and save results as local favorites
  2. Built-in emoji — Unicode emoji + recently used, plus Douyin common stickers
  3. Custom stickers — add/manage via file_picker (PNG/JPG/WebP/GIF/Lottie)
  4. Capture & edit — iOS/Android: wechat_camera_picker; Web/desktop: file_picker FileType.imagepro_image_editor
  5. Import packs — zip or single files (PNG/JPG/WebP/GIF/Lottie)

Demo

Example app screen recording (Klipy search, send, right-click to favorite):

Platform support

Feature iOS Android Web macOS Windows Linux
Panel / recent / Douyin stickers Yes Yes Yes Yes Yes Yes
file_picker add/import Yes Yes Yes Yes Yes Yes
Klipy search & save Yes Yes Yes Yes Yes Yes
Capture/pick & edit WeChat camera WeChat camera FileType.image FileType.image FileType.image FileType.image

Quick start

dependencies:
  emoji_weixin:
    path: ../ # or your dependency source
import 'package:emoji_weixin/emoji_weixin.dart';

// Option 1: global config at startup
EmojiWeixinConfig.configure(
  const EmojiWeixinConfig(klipyApiKey: 'YOUR_KLIPY_API_KEY'),
);

EmojiWeixinPanel(
  onStickerSelected: (sticker) {
    // insert into chat, etc.
  },
);

// Option 2: pass config per panel
EmojiWeixinPanel(
  config: const EmojiWeixinConfig(klipyApiKey: 'YOUR_KLIPY_API_KEY'),
  onStickerSelected: (sticker) {},
);

Run the example

cd example
# Edit assets/config.json and set klipyApiKey
flutter pub get
flutter run                      # or -d chrome / macos / windows / linux

Douyin sticker assets (disclaimer)

Built-in Douyin stickers are synced from:

Asset copyright belongs to Douyin / rights holders. For learning and exchange only — do not use commercially. Package code is MIT; Douyin media assets are not covered by MIT.

Assets live under assets/stickers/douyin/ (info.json + static/).

Klipy API key

Pass the key through configuration (not --dart-define):

  1. Create a key at KLIPY Partner Panel (docs)
  2. Host app: EmojiWeixinConfig.configure(...) or panel config:
  3. Example app: edit example/assets/config.json (see config.example.json)
  4. Show KLIPY attribution in your UI when using search (attribution)
{
  "klipyApiKey": "YOUR_KEY"
}

If the key is missing or empty, the search tab is hidden; other features still work.

Import pack format

Preferred zip layout with manifest.json:

{
  "name": "Demo Pack",
  "id": "sample_demo",
  "stickers": [
    {"file": "smile.png", "name": "smile"},
    {"file": "spark.json", "name": "spark", "kind": "lottie"}
  ]
}

Sample pack: example/assets/sample_pack.zip.

Android (example)

Aligned with kinetic_player/example:

Platform permissions

iOS

  • NSCameraUsageDescription / NSMicrophoneUsageDescription / NSPhotoLibraryUsageDescription

Android

  • CAMERA / INTERNET / READ_MEDIA_IMAGES

macOS

  • App Sandbox + network.client + files.user-selected.read-write

Main APIs

API Description
EmojiWeixinConfig App/panel configuration (e.g. Klipy key)
EmojiWeixinPanel WeChat-style bottom sticker panel
StickerRepository Pack/favorites persistence (Hive)
StickerImportService Add/import via file_picker
CameraStickerService Capture/pick + edit
KlipyClient / KlipyStickerService Search and download
StickerRenderer PNG/GIF/Lottie/Unicode rendering

Docs

License

MIT (does not include Douyin sticker asset copyright)

Libraries

emoji_weixin