-
Notifications
You must be signed in to change notification settings - Fork 198
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
base: master
Are you sure you want to change the base?
use asset bundle of inherited widget instead of root #330
Conversation
@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()); |
There was a problem hiding this comment.
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?
sorry for the late response I'll take a look over the weekend on how this could be avoided :) I already have an idea |
One should never use rootBundle because it cannot be overridden for example during testing. It's better to use DefaultAssetBundle.of(context).