rive-app / rive-app/rive-flutter
Add `package` parameter to `RiveAnimation.asset()` for package support
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 1.5k
- Forks
- 240
- PR merge metrics
- No merged PRs in 30d
Description
Problem
RiveAnimation.asset() doesn't support a package parameter, preventing Rive animations from being stored in reusable packages shared across projects.
Proposed Solution
Add a package parameter to match Flutter's convention:
RiveAnimation.asset(
'animations/my_animation.riv',
package: 'my_package',
)
Context
This pattern is standard across Flutter's asset APIs:
// Image
Image.asset('path', package: 'my_package')
// SvgPicture
SvgPicture.asset('path', package: 'my_package')
Benefit
Enables sharing Rive animations across multiple projects via packages, improving code reusability.
Note
I know that you’re deprecating RiveAnimation.asset() in version 0.14. In v0.14, it will look something like this:
late final fileLoader = FileLoader.fromAsset(
'animations/my_animation.riv',
riveFactory: Factory.rive,
package: 'my_package'
);
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the RiveAnimation.asset() API and compare its asset-loading behavior with the proposed FileLoader.fromAsset() call. Verify how Flutter asset packages are passed through, then confirm that an animation from a reusable package loads with the package argument; account for the stated deprecation of RiveAnimation.asset() in version 0.14.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100