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

패키지 상세v2.5.1

flutter_emoji

모든 최신 이모지가 포함된 가벼운 플러터용 이모지 패키지입니다. 사랑을 담아 제작했으며, 즐기세요!

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
2.4만
좋아요
199
Pub 점수
150

패키지 설치

flutter pub add flutter_emoji

패키지 개요

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

최신 이모티콘에 접근할 수 있도록 해주는 가벼운 플러터 패키지로, 앱에 쉽게 통합할 수 있도록 설계되었습니다. 안드로이드, iOS, 웹, 맥OS, 윈도우, 리눅스 등 모든 주요 플랫폼을 지원합니다. 새로운 이모티콘을 정기적으로 업데이트하며, 간단함과 성능을 중심으로 개발되었습니다. 불필요한 부담 없이 표현력 있고 최신의 이모티콘 콘텐츠로 사용자 인터페이스를 향상시키기에 이상적입니다.

사용 사례

  • 텍스트 위젯에 이모지 추가하기
  • 채팅 또는 메시징 인터페이스 만들기
  • 표현력 있는 아이콘으로 UI 개선
  • 소셜 미디어 스타일 콘텐츠 지원
  • 이모티콘 반응 표시

주요 기능

  • 최신 이모지 세트
  • 크로스 플랫폼 지원
  • 경량 크기
  • 사용하기 쉬운 API
  • 정기적인 업데이트

적합한 대상

  • 간단한 이모티콘 표시
  • 채팅 애플리케이션
  • 사용자 생성 콘텐츠
  • 소셜 기능
  • 글로벌 대상 사용자를 위한 앱

고려 사항

  • 희귀하거나 최신에 출시된 이모티콘을 위해 수동 업데이트가 필요할 수 있습니다
  • 기본 렌더링을 넘어서는 사용자 정의가 제한적
  • 내장된 이모지 선택기 없음
  • 이모지 데이터에 외부 소스에 의존합니다
  • 대규모 이모티콘 중심 레이아웃에 최적화되지 않음

원본 README

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

flutter_emoji

Build Status Coverage

Null Safety

👉 A light-weight Emoji 📦 for Flutter and Dart-based applications with all up-to-date emojis 😄. Made from 💯% ☕ with ❤️!

Inspired from the node-emoji package.

Update: since v2.3.4+, support all emojis listed in Unicode 13.0.

NOTE: I initially created this package to support my Flutter apps. However, Dart is growing to support on more platforms, so starting from v2.4.0+, this package will be available to all types of Dart-based applications.

Work in progress

I'm working on the new version of the package, it might or might not introduce breaking changes but I will try to maintain the compatibility in the API.

Here are few upcoming update to the v3:

  • Support Unicode 15.1+ emojis.
  • Skin tone
  • Group (category) of the emojis
  • Emoji version
  • Few new methods for handling/manipulating emojis.

Installation

Add this into pubspec.yaml

dependencies:
  flutter_emoji: ">= 2.0.0"

API Usage

First, import the package:

import 'package:flutter_emoji/flutter_emoji.dart';

There are two main classes you need to know to handle Emoji text: Emoji and EmojiParser.

Basically, you need to initialize an instance of EmojiParser and call its methods.

var parser = EmojiParser();
var coffee = Emoji('coffee', '☕');
var heart  = Emoji('heart', '❤️');

// Get emoji info
var emojiHeart = parser.info('heart');
print(emojiHeart); '{name: heart, full: :heart:, code: ❤️}'

// Check emoji equality
heart == emojiHeart;  // returns: true
heart == emojiCoffee; // returns: false

// Get emoji by name or code
parser.get('coffee');   // returns: Emoji{name="coffee", full=":coffee:", code="☕"}
parser.get(':coffee:'); // returns: Emoji{name="coffee", full=":coffee:", code="☕"}

parser.hasName('coffee'); // returns: true
parser.getName('coffee'); // returns: Emoji{name="coffee", full=":coffee:", code="☕"}

parser.hasEmoji('❤️'); // returns: true
parser.getEmoji('❤️'); // returns: Emoji{name="heart", full=":heart:", code="❤️"}

parser.emojify('I :heart: :coffee:'); // returns: 'I ❤️ ☕'
parser.unemojify('I ❤️ ☕'); // returns: 'I :heart: :coffee:'

// Count number of present emojis
parser.count('I ❤️ Flutter just like ☕'); // returns: 2

// Count frequency of a specific emoji
parser.frequency('I ❤️ Flutter just like ☕', '❤️'); // returns: 1

// Replace a specific emoji by another emoji
parser.replace('I ❤️ coffee', '❤️', '❤️‍🔥'); // returns: 'I ❤️‍🔥 coffee'

// Get a list of all emojis from the input
parser.parseEmojis('I ❤️ Flutter just like ☕'); // returns: ['❤️', '☕']

All methods will return Emoji.None if emoji is not found, except these two emojify() and unemojify() that will return original input.

parser.get('does_not_exist_emoji_name'); // returns: Emoji.None
Initialize emoji data for EmojiParser

There are two available datasets available you can choose to initialize for EmojiParser: local and server.

// to load local dataset
var localParser1 = EmojiParser();
var localParser2 = EmojiParser(init: false);
localParser2.initLocalData();

// to load server dataset
// this will trigger an URL request to download latest emoji data
var serverParser = EmojiParser(init: false);
await serverParser.initServerData(); // make sure to wrap in an `async` function/method.

NOTE: make sure to add Internet permission on Android.

<!-- Required to fetch data from the internet. -->
<uses-permission android:name="android.permission.INTERNET" />

In any occasion that local dataset doesn't have the latest emojis, load server dataset instead. If it is still not working, please create an issue or pull request to the repo.

TODO

Features coming to this package:

  • [x] Get detail of an emoji.
  • [x] Refactor for easier usage.
  • [x] Validate bad input.
  • [x] Find list of available emojis from a given text.
  • [x] Replace emoji by another one.
  • [x] Callback for additional formatting found emojis.
  • [x] Ability to fetch latest emoji list.
  • [ ] Make extensible emoji matcher.

License

MIT @ 2019 Pete Houston.

카테고리

의존성

의존성 목록 2 개

소스 저장소

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