RiveWidgetBuilder class

A widget that builds a Rive file.

  • The fileLoader parameter is the file loader.
  • The artboardSelector parameter specifies which artboard to use
  • The stateMachineSelector parameter specifies which state machine to use
  • The dataBind parameter specifies which view model instance to bind to
  • The builder parameter is the builder that builds the widget based on the state of the Rive file and controller.
  • The controller parameter is an optional function that builds a controller based on the Rive file. Use this to manually create the controller instead of using the default one.
Inheritance

Constructors

RiveWidgetBuilder({Key? key, required FileLoader fileLoader, ArtboardSelector artboardSelector = const ArtboardDefault(), StateMachineSelector stateMachineSelector = const StateMachineDefault(), DataBind? dataBind, required RiveBuilder builder, Controller? controller, RiveOnLoaded? onLoaded, RiveOnFailed? onFailed})
const

Properties

artboardSelector → ArtboardSelector
The selector to specify which artboard to use.
final
builder → RiveBuilder
The builder to build the widget based on the state of the Rive file and controller.
final
controller → Controller?
An optional function to manually create the controller instead of using the default one.
final
dataBind → DataBind?
The data bind to specify which view model instance to bind to.
final
fileLoader → FileLoader
The file loader to load the Rive file.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onFailed → RiveOnFailed?
An optional function to call when the Rive state failed to load.
final
onLoaded → RiveOnLoaded?
An optional function to call when the Rive state is loaded.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stateMachineSelector → StateMachineSelector
The selector to specify which state machine to use.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<RiveWidgetBuilder>
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