We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Rive.network() doesn't have onErrorBuilder. Is there any workaround? Thanks
The text was updated successfully, but these errors were encountered:
Hi @irfnyas, thanks for opening the issue. This is something that we will look into adding.
As a workaround you can load in the RiveFile yourself and provide it directly. And if it fails to load you can handle it in whatever way you want.
class SimpleNetworkAnimation extends StatefulWidget { const SimpleNetworkAnimation({Key? key}) : super(key: key); @override State<SimpleNetworkAnimation> createState() => _SimpleNetworkAnimationState(); } class _SimpleNetworkAnimationState extends State<SimpleNetworkAnimation> { @override void initState() { super.initState(); init(); } RiveFile? file; Future<void> init() async { try { RiveFile networkfile = await RiveFile.network( 'https://cdn.rive.app/animations/vehicles.riv'); setState(() { file = networkfile; }); } on Exception { // TODO display error instead. } } @override Widget build(BuildContext context) { return file != null ? RiveAnimation.direct(file!) : const CircularProgressIndicator(); } }
Sorry, something went wrong.
No branches or pull requests
Rive.network() doesn't have onErrorBuilder. Is there any workaround? Thanks
The text was updated successfully, but these errors were encountered: