flutter_twemoji 1.1.0 copy "flutter_twemoji: ^1.1.0" to clipboard
flutter_twemoji: ^1.1.0 copied to clipboard

Twemoji for Flutter!

flutter_twemoji #

Based on Discord's fork of twemoji (v16.0.1)

Usage #

Display a Single Emoji #

Use the Twemoji Widget to display individual emojis.

Twemoji(
  emoji: 'πŸ•',
  height: 50,
  width: 50,
)

Render Text with Emojis #

The TwemojiText Widget allows you to render text with embedded Twemoji.

TwemojiText(
  text: 'Flutter is awesome πŸŽ‰',
)

Rich Text with Emojis #

Combine the TwemojiTextSpan with RichText to create rich text content with emojis.

RichText(
    text: TwemojiTextSpan(
    text: 'Text πŸ•πŸ”πŸŒ­πŸΏπŸ§‚πŸ₯“πŸ₯¨πŸ₯πŸžπŸ₯žπŸ₯ž',
    style: Theme.of(context).textTheme.headline6,
  ),
)

Only include specific emojis #

By default, the package includes all twemojis. To reduce the overall bundle size, you can specify which emojis to include in your pubspec.yaml:

flutter_twemoji:
  includes: 'πŸ•πŸ”πŸŒ­πŸΏπŸ§‚πŸ₯“πŸ₯¨πŸ₯πŸžπŸ₯žπŸ₯ž'

Then call dart run flutter_twemoji:include_emojis to have it filter down the list of emojis to generate assets for.

Credits #