StreamEmojiContent class sealed
The content model for an emoji rendered by StreamEmoji.
StreamEmojiContent is a sealed type with two variants:
- StreamUnicodeEmoji — a native Unicode character (e.g. '👍').
- StreamImageEmoji — a custom image loaded from a URL.
The content model is size-independent — sizing is controlled by the StreamEmoji widget.
{@tool snippet}
Create a Unicode emoji:
const emoji = StreamUnicodeEmoji('👍');
{@end-tool}
{@tool snippet}
Create a custom image emoji:
final emoji = StreamImageEmoji(
url: Uri.parse('https://cdn.example.com/emoji/custom.png'),
);
{@end-tool}
See also:
- StreamEmoji, which renders a StreamEmojiContent at a given size.
- StreamEmojiData, the catalog model describing emoji metadata.
- Implementers
- Annotations
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited