Skip to content

[0.14.0-dev.12] Access to state machine inputs #564

@digosantos

Description

@digosantos

Description

While using stable version 0.13.20 I used to access controller inputs like this:

...
final controller = StateMachine.fromArtboard(file.mainArtboard, 'State Machine');
if (controller != null) {
  artboard.addController(controller);
  for (final i in controller.inputs) {
    if (i is SMIInput<double>) {
      _inputs[i.name] = i;
      i.value = 100.0;
    }
  }
}
...

Now, during migration to 0.14.0-dev.12 it seems the new artboard.stateMachine does not expose inputs anymore:

...
final file = await File.asset('assets/animations/my-file.riv', riveFactory: Factory.rive);
final controller = RiveWidgetController(file!, stateMachineSelector: StateMachineSelector.byName('State Machine'));
final inputs = controller.stateMachine.inputs; // ----> State Machine doesn't expose inputs 
...

Did I miss something on the migration guide or is there any other recommended way to properly access all inputs from a state machine?

I'd really appreciate some clarification on this topic.
If this should be actually handled as a feature request or something just let me know :)

Steps To Reproduce

Steps to reproduce the behavior:

  1. Update dependency to rive: 0.14.0-dev.12
  2. Load any .riv file
  3. Create instance of RiveWidgetController
  4. Try to access controller.stateMachine.inputs

Source .riv/.rev file

Reproducible with any .riv/.rev file

Expected behavior

Have access to state machine inputs: controller.stateMachine.inputs

Device & Versions (please complete the following information)

  • Device: Any
  • OS: Any
  • Flutter Version:
Flutter 3.35.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ac4e799d23 (4 weeks ago) • 2025-09-26 12:05:09 -0700
Engine • hash 0274ead41f6265309f36e9d74bc8c559becd5345 (revision d3d45dcf25) (25
days ago) • 2025-09-26 16:45:18.000Z
Tools • Dart 3.9.2 • DevTools 2.48.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions