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

Ybbaigo asset provider #214

Closed luigi-rosso closed 4 years ago

luigi-rosso commented 4 years ago

Based off of https://github.com/2d-inc/Flare-Flutter/pull/213

From @ybbaigo:

This is the first PR to support #202

If this PR is acceptable, I'll add network_flare.dart under provider/ in next PR

luigi-rosso commented 4 years ago

This is great @ybbaigo, thanks for the contribution! I think this a great foundation for allowing widgets like FlareActor to support files from different sources.

When the network provider lands, the default constructor for FlareActor could remain unchanged signature wise and allow it to determine whether it to infer the type of flareProvider to create based on the passed in path (starts with http/https then use a network provider, otherwise use the rootBundle, or something).