smart_flare
smart_flare copied to clipboard
Problem with filename in CycleFlareActor
In "/lib/actors/cycle_flare_actor.dart" I had to change on Widget Build the filename, in fact every time I tried to use this actor, VSCode gave me problem as he didn't find any "button-animation.flr" asset in assets folder.
Did you add your animation to pubspec.yaml?
Yes, of course. Problem is here, I fixed it locally, it is a little fix, nothing to worry about.
I just changed the filename part in this portion of code in '/lib/actors/cycle_flare_actor.dart' from:
Widget build(BuildContext context) {
return SmartFlareActor(
width: widget.width,
height: widget.height,
filename: 'assets/button-animation.flr', <-------
startingAnimation: widget.animations[animationIndex],
activeAreas: [
ActiveArea(
area: Rect.fromLTWH(0, 0, widget.width, widget.height),
animationsToCycle: widget.animations)
],
);
}
in this:
Widget build(BuildContext context) {
return SmartFlareActor(
width: widget.width,
height: widget.height,
filename: widget.filename, <-----
startingAnimation: widget.animations[animationIndex],
activeAreas: [
ActiveArea(
area: Rect.fromLTWH(0, 0, widget.width, widget.height),
animationsToCycle: widget.animations)
],
);
}