Unhandled Exception: Instance of 'RiveFormatErrorException'
Closed this issue · 4 comments
I copy the example code. Export file as checkedbox.flr from rive.app. And replace this line
rootBundle.load('assets/teeny_tiny.riv')
with
rootBundle.load('checkedbox.flr')
After that application throwing following exception
E/flutter (10317): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: Instance of 'RiveFormatErrorException'
E/flutter (10317): #0 new RuntimeHeader.read (package:rive/src/rive_core/runtime/runtime_header.dart:17:9)
E/flutter (10317): #1 RiveFile.import (package:rive/src/rive_file.dart:32:29)
E/flutter (10317): #2 _MyHomePageState.initState.<anonymous closure> (package:happyshooping/main.dart:128:28)
E/flutter (10317): #3 _rootRunUnary (dart:async/zone.dart:1198:47)
E/flutter (10317): #4 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (10317): #5 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
E/flutter (10317): #6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
E/flutter (10317): #7 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
E/flutter (10317): #8 Future._completeWithValue (dart:async/future_impl.dart:529:5)
E/flutter (10317): #9 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
E/flutter (10317): #10 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
E/flutter (10317): #11 PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart)
I noticed that this example use
teeny_tiny.riv
but when I generate file it's with .flr
teeny_tiny.flr
Second plugin
I also found this plugin: https://pub.dev/packages/flare_flutter
So which one should I use in my case?
If you explain the purpose of both that will be great.
Hi @abdullah432, this repository is for the upcoming Rive 2 runtimes. The editor isn't available yet and the format is very much in a state of flux. It is currently not compatible with .flr files.
Please use the second plugin you found (flare-flutter) to display .flr files.
@luigi-rosso Thanks for replying. I start using it and spend 4 to 5 hours but stuck at this problem: 2d-inc/Flare-Flutter#268 (comment)
Please help with that
You guys need to simplify this. I can't make anything work. Your documentation is terrible. Why not a simple working example? Do I use rive, or flutter-flare or what? I'm trying rive, but got format errors. I copied the code from your examples directory.
Hey @sgehrman can you be more specific about what issue you're running into? This repository is for https://beta.rive.app, which is a totally new version of Rive that is currently in closed beta. If you're using Rive 1 (from https://rive.app) then you should be using this runtime, which has several examples: https://github.com/2d-inc/Flare-Flutter
I realize it's a bit confusing as we're in the middle of a transition and there's the added confusion of our rebrand (Rive was previously Flare). We're working on clarifying the messaging across our pages.