From 91775b21d69f2f940b4f89720f47662fcbb129c0 Mon Sep 17 00:00:00 2001 From: KorbinianMossandl <36412668+KorbinianMossandl@users.noreply.github.com> Date: Tue, 31 Mar 2020 12:06:31 +0200 Subject: [PATCH 1/2] added key to FlareActor added a Key to all constructors of FlareActor --- flare_flutter/lib/flare_actor.dart | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/flare_flutter/lib/flare_actor.dart b/flare_flutter/lib/flare_actor.dart index 1589c25..48fe7f1 100644 --- a/flare_flutter/lib/flare_actor.dart +++ b/flare_flutter/lib/flare_actor.dart @@ -72,8 +72,9 @@ class FlareActor extends LeafRenderObjectWidget { /// dimensions of this widget. final bool sizeFromArtboard; - const FlareActor( + const FlareActor( this.filename, { + Key key, this.boundsNode, this.animation, this.fit = BoxFit.contain, @@ -86,10 +87,12 @@ class FlareActor extends LeafRenderObjectWidget { this.shouldClip = true, this.sizeFromArtboard = false, this.artboard, - }) : flareProvider = null; + }) : flareProvider = null, + super(key: key); FlareActor.rootBundle( String name, { + Key key, this.boundsNode, this.animation, this.fit = BoxFit.contain, @@ -103,10 +106,12 @@ class FlareActor extends LeafRenderObjectWidget { this.sizeFromArtboard = false, this.artboard, }) : filename = null, - flareProvider = AssetFlare(bundle: rootBundle, name: name); + flareProvider = AssetFlare(bundle: rootBundle, name: name), + super(key: key); const FlareActor.asset( this.flareProvider, { + Key key, this.boundsNode, this.animation, this.fit = BoxFit.contain, @@ -119,7 +124,8 @@ class FlareActor extends LeafRenderObjectWidget { this.shouldClip = true, this.sizeFromArtboard = false, this.artboard, - }) : filename = null; + }) : filename = null, + super(key: key); @override RenderObject createRenderObject(BuildContext context) { From 87f5e042fbfd6d731ef70af42fb6ee1d46b4296c Mon Sep 17 00:00:00 2001 From: KorbinianMossandl <36412668+KorbinianMossandl@users.noreply.github.com> Date: Tue, 31 Mar 2020 12:08:00 +0200 Subject: [PATCH 2/2] Update flare_actor.dart --- flare_flutter/lib/flare_actor.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flare_flutter/lib/flare_actor.dart b/flare_flutter/lib/flare_actor.dart index 48fe7f1..652af18 100644 --- a/flare_flutter/lib/flare_actor.dart +++ b/flare_flutter/lib/flare_actor.dart @@ -72,7 +72,7 @@ class FlareActor extends LeafRenderObjectWidget { /// dimensions of this widget. final bool sizeFromArtboard; - const FlareActor( + const FlareActor( this.filename, { Key key, this.boundsNode,