Skip to content

Conversation

@lancesnider
Copy link
Contributor

Swaps out the current .riv for this one:

CleanShot 2025-09-23 at 22 09 02@2x CleanShot 2025-09-23 at 22 08 45@2x CleanShot 2025-09-23 at 22 04 04@2x

@HayesGordon
Copy link
Contributor

Future feature request, I typically use this current example to test out hit testing for layouts when we make changes. This is currently happening frequently as we're developing the new Flutter code. But long-term should not be an issue.

HayesGordon
HayesGordon previously approved these changes Sep 25, 2025
Copy link
Contributor

@HayesGordon HayesGordon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

}

void _onLoaded(RiveLoaded state) {
viewModelInstance = state.controller.dataBind(DataBind.auto());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah didn't notice this last time, you can remove this, and instead provide the dataBind property to RiveWidgetBuilder.

Then in onLoad, you can do state.viewModelInstance to access it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh because it's a new commit, that's why I didn't notice this :)

void dispose() {
// This widget state owns the file loader, dispose it.
fileLoader.dispose();
viewModelInstance.dispose();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use the builder to create the viewModelInstance you also don't need to dispose it here. The builder will dispose.

Copy link
Contributor

@HayesGordon HayesGordon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized this not on Mono! We need to add the change from there.

@lancesnider
Copy link
Contributor Author

Closing this in favor of a PR in mono.

@lancesnider lancesnider closed this Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants