RiveConfig class

Configuration class for Rive animation splash screens

Constructors

RiveConfig({List<String> stateMachineName = const [], List<String> animations = const [], String? artboardName, BoxFit fit = BoxFit.contain, bool autoplay = true, Alignment alignment = Alignment.center, List<RiveAnimationController> controllers = const [], void onInit(Artboard)?, bool useSafeArea = false, FileAssetLoader? assetLoader, bool loadCdnAssets = true, ObjectGenerator? objectGenerator, Rect? clipRect, bool isTouchScrollEnabled = false, double speedMultiplier = 1, RiveHitTestBehavior behavior = RiveHitTestBehavior.opaque, bool useArtboardSize = false, bool antialiasing = true, bool enablePointerEvents = false, MouseCursor cursor = MouseCursor.defer, Map<String, String>? headers, Widget? placeHolder, Duration? splashDuration})
Creates a configuration for Rive animation splash screens
const

Properties

alignment → Alignment
Alignment of the animation within its bounds
final
animations → List<String>
The name of the animation to play
final
antialiasing → bool
Controls if antialiasing is applied to the animation
final
artboardName → String?
The name of the artboard to use
final
assetLoader → FileAssetLoader?
Custom asset loader for loading Rive assets
final
autoplay → bool
Whether to play animation automatically
final
behavior → RiveHitTestBehavior
Defines the behavior when hit testing the Rive animation
final
clipRect → Rect?
Rectangle used to clip the animation
final
controllers → List<RiveAnimationController>
Use this to provide custom controllers for the Rive animation
final
cursor → MouseCursor
The cursor to show when hovering over the animation
final
enablePointerEvents → bool
Controls if pointer events are enabled for the animation
final
fit → BoxFit
Controls how the animation fits within its bounds
final
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>?
HTTP headers to use when fetching animation from network
final
isTouchScrollEnabled → bool
Controls if the animation responds to touch scroll events
final
loadCdnAssets → bool
Whether to load CDN assets referenced within the Rive file
final
objectGenerator → ObjectGenerator?
Factory function for creating custom Core objects
final
onInit → void Function(Artboard)?
Called when the Rive file is loaded and ready to be displayed
final
placeHolder → Widget?
A widget to display as a placeholder while the Rive animation is loading
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
speedMultiplier → double
Multiplier for animation playback speed
final
splashDuration → Duration?
Duration for which the splash will be visible for Rive animations. If provided, this overrides the automatic duration calculation.
final
stateMachineName → List<String>
The name of the animation state machine to play
final
useArtboardSize → bool
Whether to use the artboard's dimensions for layout
final
useSafeArea → bool
Called when there's a playback state change Whether to use a SafeArea widget
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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