Skip to content

[rive-flutter]show empty when called setState #492

@LeoKong

Description

@LeoKong

I use RiveAnimation.asset show first animation,when I call setState change second asset,it showed empty。
But it work when I use RiveAnimation.network change url。
Here is my code:
`Column(

            children: [
              SizedBox(
                width: 100,
                height: 100,
                child: RiveAnimation.asset(
                  isChange ? 'assets/rive/tab_home.riv' : 'assets/rive/tab_back.riv',
                ),
              ),
              FilledButton(
                onPressed: () {
                  setState(() {
                    isChange = !isChange;
                  });
                },
                child: Text('change'),
              ),
            ],
          )`

rive: ^0.13.4
Flutter version 3.13.9

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