Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use asset bundle of inherited widget instead of root #330

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

lunaticcoding
Copy link

One should never use rootBundle because it cannot be overridden for example during testing. It's better to use DefaultAssetBundle.of(context).

@lunaticcoding
Copy link
Author

@mjtalbot Any update?

@mjtalbot
Copy link
Collaborator

@mjtalbot Any update?

thank you for the prod, let me chase this one down

@@ -173,7 +173,7 @@ class RiveAnimationState extends State<RiveAnimation> {
@override
void initState() {
super.initState();
_configure();
WidgetsBinding.instance.addPostFrameCallback((_) => _configure());
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is the main concern with this PR.

Presumably this pushes the first frame of the animation back a render cycle? I am guessing this is to ensure that the context has been loaded before loadRiveFile is executed?

@lunaticcoding
Copy link
Author

sorry for the late response I'll take a look over the weekend on how this could be avoided :) I already have an idea

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