TAnimationLoader constructor
const
TAnimationLoader({})
Creates a TAnimationLoader.
messageis the message displayed below the animation.animationis the path to the animation asset (e.g., Lottie or image).isLottieAnimationWeather this is a Lottie or simple gif/image.showActioncontrols the visibility of the action button.actionChildOptional Child widget for the actions at the bottom of animation.actionTextis the label for the action button (optional, required ifshowActionis true).onActionPressedis the callback executed when the action button is pressed.heightandwidthset the size of the animation (default: 400x400).stylecustomizes the text style for the message.
Implementation
const TAnimationLoader({
super.key,
this.message,
this.animation,
this.showAction = false,
this.actionText,
this.onActionPressed,
this.height = 200,
this.width = 200,
this.style,
this.actionChild,
this.isLottieAnimation = false,
}) : assert(
!showAction || (showAction && actionText != null),
'actionText must be provided when showAction is true, in TAnimationLoader.',
);