rive-app / rive-flutter

Flutter runtime for Rive
https://rive.app
MIT License
1.21k stars 191 forks source link

unable to play from disk, rather than rootBundle #84

Closed BwanaBuna closed 3 years ago

BwanaBuna commented 3 years ago

Before rive flutter rive 0.7.1, I was able to play rive animations from disk, with 'dart:io' and file.import. With rive flutter 0.7.1, I can not get it to play animations from disk. I am not sure if this is a bug, or if I am just missing something.

BwanaBuna commented 3 years ago

additional details: I have exported the rive file in format 7.0. and it does work using rootBundle.load, but the application logic means using rootBundle.load is not an option. I need to be able to play from disk.

BwanaBuna commented 3 years ago

Rive 0.7.1 does play from disk with the following code

final file = RiveFile.import(bytes);

setState(() => _artboard = file.mainArtboard ..addController( SimpleAnimation('idle'), ));