LottiePro class
Enhanced Lottie widget with advanced controls and interactions.
This widget provides enhanced Lottie animation capabilities including:
- Custom animation controls
- Interactive elements
- Advanced playback options
- Cross-platform optimization
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- LottiePro
Constructors
-
LottiePro.asset(String? asset, {Key? key, LottieProController? controller, double? width, double? height, BoxFit? fit, AlignmentGeometry? alignment, bool repeat = false, bool reverse = false, bool animate = true, double? frameRate, List<
LottieProInteraction> ? interactions, bool allowCustomInteractions = true, VoidCallback? onLoaded, VoidCallback? onComplete, ValueChanged<double> ? onFrameChanged, ValueChanged<LottieProAnimationState> ? onStateChanged, Widget errorBuilder(Object error, StackTrace? stackTrace)?, WidgetBuilder? loadingBuilder}) -
Creates a LottiePro widget from an asset
const
-
LottiePro.composition(LottieComposition? composition, {Key? key, LottieProController? controller, double? width, double? height, BoxFit? fit, AlignmentGeometry? alignment, bool repeat = false, bool reverse = false, bool animate = true, double? frameRate, List<
LottieProInteraction> ? interactions, bool allowCustomInteractions = true, VoidCallback? onLoaded, VoidCallback? onComplete, ValueChanged<double> ? onFrameChanged, ValueChanged<LottieProAnimationState> ? onStateChanged, Widget errorBuilder(Object error, StackTrace? stackTrace)?, WidgetBuilder? loadingBuilder}) -
Creates a LottiePro widget from a composition
const
-
LottiePro.network(String? url, {Key? key, LottieProController? controller, double? width, double? height, BoxFit? fit, AlignmentGeometry? alignment, bool repeat = false, bool reverse = false, bool animate = true, double? frameRate, List<
LottieProInteraction> ? interactions, bool allowCustomInteractions = true, VoidCallback? onLoaded, VoidCallback? onComplete, ValueChanged<double> ? onFrameChanged, ValueChanged<LottieProAnimationState> ? onStateChanged, Widget errorBuilder(Object error, StackTrace? stackTrace)?, WidgetBuilder? loadingBuilder}) -
Creates a LottiePro widget from a network URL
const
Properties
- alignment → AlignmentGeometry?
-
Alignment of the animation
final
- allowCustomInteractions → bool
-
Whether to allow custom interactions (set to false for interactive Lottie files)
final
- animate → bool
-
Whether the animation should animate
final
- asset → String?
-
Asset path for the Lottie animation
final
- composition → LottieComposition?
-
The source of the Lottie animation
final
- controller → LottieProController?
-
The LottiePro controller for managing animation state
final
- errorBuilder → Widget Function(Object error, StackTrace? stackTrace)?
-
Error builder widget
final
- fit → BoxFit?
-
Fit behavior for the animation
final
- frameRate → double?
-
Frame rate for the animation
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Height of the animation
final
-
interactions
→ List<
LottieProInteraction> ? -
Custom interaction handlers
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingBuilder → WidgetBuilder?
-
Loading builder widget
final
- onComplete → VoidCallback?
-
Callback when animation completes
final
-
onFrameChanged
→ ValueChanged<
double> ? -
Callback when animation frame changes
final
- onLoaded → VoidCallback?
-
Callback when animation is loaded
final
-
onStateChanged
→ ValueChanged<
LottieProAnimationState> ? -
Callback when animation state changes
final
- repeat → bool
-
Whether to repeat the animation
final
- reverse → bool
-
Whether to reverse the animation when repeating
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- url → String?
-
Network URL for the Lottie animation
final
- width → double?
-
Width of the animation
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< LottiePro> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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, int wrapWidth = 65}) → 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