ViewModelSource

sealed interface ViewModelSource

One half of a source for a ViewModelInstance. This represents the view model that originates the instance. This can be either Named to refer to a specific view model, or DefaultForArtboard, which will use the default view model for the given Artboard. This is usually the one the designer has intended to be used with the artboard.

The ViewModelInstanceSource is the other half, which represents the specific view model instance. The helper methods on this interface are provided as a builder pattern.

Inheritors

Types

Link copied to clipboard

The default view model for the given artboard.

Link copied to clipboard
value class Named(val viewModelName: String) : ViewModelSource

A specific view model by name.

Functions

Link copied to clipboard

A view model instance with default initialized properties.

Link copied to clipboard

The instance marked "Default" in the Rive file.

Link copied to clipboard

A specific instance by name.