From 8fcd773a12c11bbb0b6bec1c8829b7af4d341bae Mon Sep 17 00:00:00 2001 From: Luigi Rosso Date: Thu, 7 Nov 2019 15:09:48 -0800 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit c9f434180a766600121f493f62c485963d171231 Author: Luigi Rosso Date: Thu Nov 7 15:05:04 2019 -0800 Backing out changeImageFromNetwork. Issue #183 commit e9712a4244eefe96e8b4644be1a6e8eb0d3feae1 Author: Luigi Rosso Date: Thu Nov 7 12:32:17 2019 -0800 Bumping versions. commit 366cdc03cef7110f9247b4de332a12f40d987f32 Author: Luigi Rosso Date: Thu Nov 7 12:27:53 2019 -0800 Adding support for runtime image swapping, requires marking image nodes as isDynamic in Flare. Issue #183. commit 53a7c659b772f5b9442f569be0a389512a77ff29 Author: Luigi Rosso Date: Wed Nov 6 17:30:42 2019 -0800 Updating flare_flutter version. commit b391dd4343b710fa575b45c47d11aca8b3cb4b52 Merge: 1e9b22e 9ec074b Author: Luigi Rosso Date: Wed Nov 6 17:28:34 2019 -0800 Merge branch 'warmth_fix' commit 9ec074be6328914ebcd82e5285c9aef9e408e1d5 Author: Luigi Rosso Date: Wed Nov 6 15:43:31 2019 -0800 Call setState if mounted. commit c66ac647efac650ef38b425fa7488343e36a075f Author: Luigi Rosso Date: Wed Nov 6 15:38:06 2019 -0800 Addressing an issue found in #177 with FlareCacheBuilder setting state when widget is no longer mounted. commit 1e9b22e0aa12e27c362fcaf28d914aa482198db9 Author: Umberto Sonnino Date: Wed Nov 6 19:02:25 2019 +0100 Init mat before inverting commit bc07b8752c05bd1a05cfcded0c2193e23602a1e0 Author: Umberto Sonnino Date: Wed Nov 6 19:00:13 2019 +0100 Remove local flare_dart from examples pubspec #184 commit e1cca7cdc97bdfb1fd19d2ee365ce901c1e8339a Author: Luigi Rosso Date: Tue Oct 29 12:50:30 2019 -0700 Bumping versions, merging optimal_load branch, and persisting settings in checkbox example. commit 55cae393bb92dcd7157a5b12c55074e3bafa6d6d Author: Luigi Rosso Date: Tue Oct 29 12:41:43 2019 -0700 Copy transform affects stroke properly when instancing shapes. commit 43716dd3449266fe9f6f42c5bf05701d0bb06b88 Author: Luigi Rosso Date: Mon Oct 28 12:52:09 2019 -0700 Prevent coldLoad (async) from happening when widget isn’t ready to load. commit 506837e0bafff3060318bc65d03296ebb599f284 Author: Luigi Rosso Date: Fri Oct 25 13:00:56 2019 -0700 Improving loading. commit 9ee95b964dde6ee3fb17b9e969ab00b3d0992c9f Author: Luigi Rosso Date: Fri Oct 25 10:42:42 2019 -0700 Make sure overrideColor is set even when drawableNodes is null. commit 7d59de1e77c040acc271bc3981a70517856a31b1 Author: Umberto Sonnino Date: Fri Oct 25 13:15:34 2019 +0100 Move null check commit 528af53a2bc9ac68d00fc30aadb2f78509fff922 Author: Umberto Sonnino Date: Fri Oct 25 13:10:17 2019 +0100 Insert null checks for artboards with no drawables #178 commit 33f23a7d29b5adf04f5b6536ddaf74f1aa590165 Author: Umberto Sonnino Date: Fri Oct 25 12:16:16 2019 +0100 Remove GradientColor override of ActorPaint opacity getter #179 commit 59ba2f08174b43c7a7f8a7ff97cd04d533da1eea Author: Umberto Sonnino Date: Thu Oct 24 09:31:41 2019 +0100 Document the `actor_animatino.apply()` function commit d77438f87f7aae2d850a8295ae4d9a5b33505694 Author: Umberto Sonnino Date: Thu Oct 24 09:31:10 2019 +0100 Fix division by 0 on transform constraint commit f0cf988bc3ef928b8b96ae217133ecadca02b418 Author: Luigi Rosso Date: Fri Oct 11 12:59:13 2019 -0700 Fix reading of JSON clip values. Issue #172 commit a7796e0d6e9b5ea6957eafc9f784ba4c36320967 Author: Luigi Rosso Date: Fri Oct 11 12:39:48 2019 -0700 Mitigating issue #172. commit 373c14a4f3b2360c4252a8ac834c23bb28068f6e Author: Luigi Rosso Date: Wed Oct 9 14:21:47 2019 -0700 Fixing issue with image clipping. commit ae1c901441306953f09549b4c3bdd4612cc86af4 Author: Luigi Rosso Date: Wed Oct 9 11:19:16 2019 -0700 Fix merge bugs. commit d8cb780a543fe9fd35d60bcfcb198b70622c524f Author: Luigi Rosso Date: Wed Oct 9 11:09:42 2019 -0700 Adding support for difference clipping. commit bf99a765746f321937315e7ecd96aaa190a3d20b Author: Luigi Rosso Date: Tue Oct 8 19:07:26 2019 -0700 Matching stable version commit 9becc744d0d50f10533e3ad1f7c0b4daee6604c2 Author: Luigi Rosso Date: Tue Oct 8 13:58:11 2019 -0700 Bumping flare_dart to 2.0 due to breaking changes. commit 0a292cc67ea8d261057b9f9e5c32028e3436436c Author: Luigi Rosso Date: Tue Oct 8 13:39:57 2019 -0700 Bumping versions and changelogs. commit 431a98e4804efe6d073a9b55a9ce1a5f23c7ca4d Author: Luigi Rosso Date: Tue Oct 8 13:35:26 2019 -0700 Fixing up analysis issues for #169 commit 72fb6fc743ed3a241c7c51e5a8ebc90836f734ba Merge: 4d00202 dc68dea Author: Luigi Rosso Date: Tue Oct 8 13:02:17 2019 -0700 Merge branch 'master' of https://github.com/2d-inc/Flare-Flutter commit 4d00202a4f24b2c3d581b28cb15b953ec91c9f3c Author: Luigi Rosso Date: Tue Oct 8 13:02:11 2019 -0700 Cleaning up analysis issues. commit dc68dea6d57cb504d1a867c7e4c5b6768ec5dfe2 Merge: 5ca8d49 f1d9749 Author: Luigi Rosso Date: Tue Oct 8 11:06:53 2019 -0700 Merge pull request #168 from mehmetf/master Escalate the severity of unused imports in analyzer commit f1d97496a2679f470202f17298cd76a0411d7a8c Author: Mehmet Fidanboylu Date: Tue Oct 8 10:20:58 2019 -0700 Do the same changes to flare_dart commit 64f395edf7c6f8419a7a461e46664ff3723cfa78 Author: Mehmet Fidanboylu Date: Tue Oct 8 10:17:51 2019 -0700 Escalate the severity of unused imports in analyzer commit 5ca8d49c09406d1ac62ffffd4d0c5082744be7a3 Author: Luigi Rosso Date: Mon Oct 7 11:22:38 2019 -0700 Bumping versions and changelog. commit 874ce8e0b77a8ffc3eea9027cb31e2b75437da01 Author: Luigi Rosso Date: Mon Oct 7 11:20:28 2019 -0700 Adding support for nodes inside of shapes. commit 4d06431f341b426dd5cc41529a49c115e6354c51 Author: Luigi Rosso Date: Fri Oct 4 18:06:09 2019 -0700 Introducing FlareTesting.setup(); commit 2c5f4200535d679fd3092d1b6aa15ff71d85b869 Author: Luigi Rosso Date: Fri Oct 4 13:44:25 2019 -0700 Clamping trim start/end. commit daba34d11233391e7277b157bc117b8bbb626982 Author: Luigi Rosso Date: Mon Sep 30 21:21:55 2019 +0200 Cherry picking critical lints from #1 63 and updating for pub. --- flare_flutter/CHANGELOG.md | 5 +++++ flare_flutter/lib/flare.dart | 34 ++++++++++++++++++---------------- flare_flutter/pubspec.yaml | 2 +- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/flare_flutter/CHANGELOG.md b/flare_flutter/CHANGELOG.md index 08f6de5..291c2f8 100644 --- a/flare_flutter/CHANGELOG.md +++ b/flare_flutter/CHANGELOG.md @@ -1,3 +1,8 @@ +## [1.7.1] - 2019-11-07 15:03:39 + +- Backing out changeImageFromNetwork until new PaintingBinding.instance.instantiateImageCodec signature lands in stable. +- You can manually implement this function if you need it. Example here: https://gist.github.com/luigi-rosso/c50277341bd2681be072a575acbeb1fc#file-dynamic_image_swapping-dart-L60 + ## [1.7.0] - 2019-11-07 12:16:35 - Adding support for runtime image swapping. diff --git a/flare_flutter/lib/flare.dart b/flare_flutter/lib/flare.dart index a629c0b..7222ff6 100644 --- a/flare_flutter/lib/flare.dart +++ b/flare_flutter/lib/flare.dart @@ -1100,22 +1100,24 @@ class FlutterActorImage extends ActorImage with FlutterActorDrawable { /// Change the image for this node via a network url. /// Returns true when successful. - Future changeImageFromNetwork(String url) async { - var networkImage = NetworkImage(url); - var val = await networkImage.obtainKey(const ImageConfiguration()); - var load = networkImage.load(val, (Uint8List bytes, - {int cacheWidth, int cacheHeight}) { - return PaintingBinding.instance.instantiateImageCodec(bytes, - cacheWidth: cacheWidth, cacheHeight: cacheHeight); - }); - - final completer = Completer(); - load.addListener(ImageStreamListener((ImageInfo info, bool syncCall) { - changeImage(info.image); - completer.complete(true); - })); - return completer.future; - } + /// TODO: re-enable this when the changes to instantiateImageCodec + /// land in stable. +// Future changeImageFromNetwork(String url) async { +// var networkImage = NetworkImage(url); +// var val = await networkImage.obtainKey(const ImageConfiguration()); +// var load = networkImage.load(val, (Uint8List bytes, +// {int cacheWidth, int cacheHeight}) { +// return PaintingBinding.instance.instantiateImageCodec(bytes, +// cacheWidth: cacheWidth, cacheHeight: cacheHeight); +// }); + +// final completer = Completer(); +// load.addListener(ImageStreamListener((ImageInfo info, bool syncCall) { +// changeImage(info.image); +// completer.complete(true); +// })); +// return completer.future; +// } /// Change the image for this node with one in an asset bundle. /// Returns true when successful. diff --git a/flare_flutter/pubspec.yaml b/flare_flutter/pubspec.yaml index 4e50caf..7aa9b62 100644 --- a/flare_flutter/pubspec.yaml +++ b/flare_flutter/pubspec.yaml @@ -1,6 +1,6 @@ name: flare_flutter description: Vector design and runtime animation for Flutter. -version: 1.7.0 +version: 1.7.1 author: "2Dimensions Team " homepage: https://github.com/2d-inc/Flare-Flutter environment: