emoji_weixin 0.2.0
emoji_weixin: ^0.2.0 copied to clipboard
WeChat-style emoji/sticker panel for Flutter with Klipy search, custom stickers, camera capture, and GIF/Lottie pack import.
emoji_weixin #
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:
- Klipy online search — download and save results as local favorites
- Built-in emoji — Unicode emoji + recently used, plus Douyin common stickers
- Custom stickers — add/manage via
file_picker(PNG/JPG/WebP/GIF/Lottie) - Capture & edit — iOS/Android:
wechat_camera_picker; Web/desktop:file_pickerFileType.image→pro_image_editor - 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):
- Create a key at KLIPY Partner Panel (docs)
- Host app:
EmojiWeixinConfig.configure(...)or panelconfig: - Example app: edit
example/assets/config.json(seeconfig.example.json) - 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:
compileSdk/targetSdk: 37minSdk: 24- AGP: 9.3.1
- Kotlin: 2.4.10
- Gradle: 9.6.1
file_picker: 12.0.0-beta.7 (AGP 9 compatible)- Release signing:
example/android/key.properties+example/jks/emoji_weixin.jks(demo keystore; replace for production) - Release minify/shrink +
proguard-rules.pro
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 #
- English (default): README.md, CHANGELOG.md
- Simplified Chinese: README.zh-CN.md, CHANGELOG.zh-CN.md
License #
MIT (does not include Douyin sticker asset copyright)