AnimatedEmoji class

A widget that shows an animated emoji.

emoji defines which emoji is displayed.

source determents whether the emoji is loaded from the network or assets. By default this tries to load from assets and falls back to network.

The animation is repeatedly played by default. Change this behavior with repeat and animate.

This example shows how to create a emoji that animates once.

😀
const AnimatedEmoji(
 AnimatedEmojis.smile,
 size: 128,
 repeat: false,
),
Inheritance

Constructors

AnimatedEmoji(AnimatedEmojiData emoji, {double? size, AnimatedEmojiSource? source, Animation<double>? controller, Key? key, bool repeat = true, bool animate = true, Widget? errorWidget, void onLoaded(Duration duration)?})
Creates an animated emoji
const

Properties

animate → bool
Controls if the animation is active.
final
controller → Animation<double>?
AnimationController that controls the animation.
final
emoji → AnimatedEmojiData
The AnimatedEmojiData used for this widget.
final
errorWidget → Widget?
Widget shown when the emoji failed to load.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onLoaded → (void Function(Duration duration)?)
This function is called after the animation was successfully loaded.
final
repeat → bool
Whether to play the animation once or repeatedly
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → double?
The size of the emoji.
final
source → AnimatedEmojiSource?
The source from where the emoji is loaded.
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited