2d-inc / Flare-Flutter

Load and get full control of your Rive files in a Flutter project using this library.
https://rive.app/
MIT License
2.55k stars 469 forks source link

Request for Clarification: Flare-Flutter vs Rive Flutter Runtime Use Cases #296

Closed apteryxlabs closed 3 years ago

apteryxlabs commented 3 years ago

Could someone clarify whether this (Flare-Flutter) or the Rive Flutter runtime are intended for use with the .riv files created by Rive.app? There is no obvious delineation between the two on this or the Rive website, and various online tutorials offer conflicting advice.

Specifically, which of the two libraries (or both) will be maintained alongside flutter going forward? Will both be updated for null safety? What about flutter 2.0? Desktop support?

umberto-sonnino commented 3 years ago

Hi @apteryxlabs! Rive 2 will export .riv files which can be used with the Rive Flutter runtime. This is what we recommend using going forward.

This runtime is compatible with .flr files that can be exported from Rive 1. We've updated the runtime to null-safety last week, which is currently in pre-release. If you want to try it out include it in your pubspec like so:

dependencies:
    flare_flutter: ^3.0.0-nullsafety.0
apteryxlabs commented 3 years ago

Great! @umberto-sonnino can you confirm whether something like the FlareActor abstraction will eventually be integrated with the Rive 2 runtime?

luigi-rosso commented 3 years ago

Hi @apteryxlabs, regarding your first question about maintaining both: We will continue to support Flare for the Flutter community but primarily only for breaking issues with Flutter itself (like nnbd), or egregious bugs. The intention is very much to help the community migrate over to Rive as both the editor and new runtimes are what we're focusing our efforts on with regards to new features.

With regards to FlareActor abstraction, which abstraction feature are you most interesting in?

The most similar thing to it is the RiveFile object in Rive. It doesn't currently expose an abstraction for creating your own custom instances of component types, but you'll see that it does have some concept/ability to do this under the hood: https://github.com/rive-app/rive-flutter/blob/462faf20ffc430348cc8a61805867c0248efd1bd/lib/src/rive_file.dart#L178

We could introduce this kind of "overriding" of objects if that's valuable. On a similar track, instancing of Artboards is currently not supported in Rive, but it is our plan to add that functionality in the near future (allowing you to have multiple instance of animated files without reloading the file multiple times per instance).

Finally, we're working on porting rive-flutter to nnbd too, this one will take a little longer due to how it shares some codebase with our editor. We're hoping to have it ready by the end of March.

apteryxlabs commented 3 years ago

You've hit the nail on the head - thank you! Will use Rive_Flutter in my work going forward. Thanks!