TAnimationLoader constructor
const
TAnimationLoader({})
Creates a TAnimationLoader.
message
is the message displayed below the animation.animation
is the path to the animation asset (e.g., Lottie or image).isLottieAnimation
Weather this is a Lottie or simple gif/image.showAction
controls the visibility of the action button.actionChild
Optional Child widget for the actions at the bottom of animation.actionText
is the label for the action button (optional, required ifshowAction
is true).onActionPressed
is the callback executed when the action button is pressed.height
andwidth
set the size of the animation (default: 400x400).style
customizes 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.',
);