AnimatedEmoji constructor

const AnimatedEmoji(
  1. AnimatedEmojiData emoji, {
  2. double? size,
  3. AnimatedEmojiSource? source,
  4. Animation<double>? controller,
  5. Key? key,
  6. bool repeat = true,
  7. bool animate = true,
  8. Widget? errorWidget,
  9. void onLoaded(
    1. Duration duration
    )?,
})

Creates an animated emoji

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,
),

Implementation

const AnimatedEmoji(
  this.emoji, {
  this.size,
  this.source,
  this.controller,
  super.key,
  this.repeat = true,
  this.animate = true,
  this.errorWidget,
  this.onLoaded,
});