Skip to content

Fix flet_rive extension to work with Rive 0.14.2 update#6128

Merged
FeodorFitsner merged 1 commit intomainfrom
rive-fix
Feb 5, 2026
Merged

Fix flet_rive extension to work with Rive 0.14.2 update#6128
FeodorFitsner merged 1 commit intomainfrom
rive-fix

Conversation

@FeodorFitsner
Copy link
Contributor

@FeodorFitsner FeodorFitsner commented Feb 4, 2026

Update pubspec.lock with newer transitive package versions and checksums (cross_file, hooks, record_* packages, rive, rive_native, etc.). Adapt Rive usage in rive.dart to the newer API: replace machine.onInputChanged handlers with addAdvanceRequestListener/_onAdvanceRequested, remove the _inputHandlers list and its disposal, remove artboard.updatePass() from the advance check, and ensure advance request listeners are removed on dispose. These changes align the code with updated Rive package behavior and dependency updates.

Summary by Sourcery

Update Rive integration to be compatible with the Rive 0.14.2 API and clean up obsolete listeners and handlers.

Enhancements:

  • Switch Rive state machine usage from input change handlers to advance request listeners to align with the updated Rive API.
  • Simplify artboard advancing logic by relying solely on artboard.advance and removing the extra update pass.
  • Ensure Rive state machines correctly unregister advance request listeners on dispose to prevent leaks and stale callbacks.

Build:

  • Refresh pubspec.lock to newer transitive dependency versions and checksums for Rive and related packages.

Update pubspec.lock with newer transitive package versions and checksums (cross_file, hooks, record_* packages, rive, rive_native, etc.). Adapt Rive usage in rive.dart to the newer API: replace machine.onInputChanged handlers with addAdvanceRequestListener/_onAdvanceRequested, remove the _inputHandlers list and its disposal, remove artboard.updatePass() from the advance check, and ensure advance request listeners are removed on dispose. These changes align the code with updated Rive package behavior and dependency updates.
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We've reviewed this pull request using the Sourcery rules engine

@FeodorFitsner
Copy link
Contributor Author

@copilot update pull request description.

@FeodorFitsner
Copy link
Contributor Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 531c59e7e9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the flet_rive extension to be compatible with Rive 0.14.2 by migrating from the deprecated input change handler API to the new advance request listener API.

Changes:

  • Migrated from onInputChanged callback handlers to addAdvanceRequestListener API for state machine event handling
  • Removed obsolete artboard.updatePass() call from the advance logic
  • Updated transitive dependencies in pubspec.lock including rive (0.14.1 → 0.14.2), rive_native, cross_file, hooks, and record_* packages

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
sdk/python/packages/flet-rive/src/flutter/flet_rive/lib/src/rive.dart Migrated state machine event handling from input change handlers to advance request listeners, removed the _inputHandlers list, updated cleanup logic to remove listeners before disposal, and simplified artboard advance logic
client/pubspec.lock Updated dependency versions and checksums for rive, rive_native, cross_file, hooks, and various record_* packages to reflect Rive 0.14.2 compatibility updates

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@FeodorFitsner FeodorFitsner merged commit aaf88e9 into main Feb 5, 2026
65 of 76 checks passed
@FeodorFitsner FeodorFitsner deleted the rive-fix branch February 5, 2026 00:26
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.

1 participant