Based on Discord's fork of twemoji (v16.0.1)
Use the Twemoji Widget to display individual emojis.
Twemoji(
emoji: '🍕',
height: 50,
width: 50,
)The TwemojiText Widget allows you to render text with embedded Twemoji.
TwemojiText(
text: 'Flutter is awesome 🎉',
)Combine the TwemojiTextSpan with RichText to create rich text content with emojis.
RichText(
text: TwemojiTextSpan(
text: 'Text 🍕🍔🌭🍿🧂🥓🥨🥐🍞🥞🥞',
style: Theme.of(context).textTheme.headline6,
),
)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.
- Originally maintained by hadi-codes
