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