From 1bc825d27d749802545fc9848e59ff8f78ba1a82 Mon Sep 17 00:00:00 2001 From: Christophe Grand Date: Thu, 29 Jun 2023 11:11:51 +0200 Subject: [PATCH] fix: :vsync was not participating correctly in the local scope; locals defined above :vsync where frozen in time --- clj/src/cljd/flutter.cljd | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/clj/src/cljd/flutter.cljd b/clj/src/cljd/flutter.cljd index 7a8308a8..b891b585 100644 --- a/clj/src/cljd/flutter.cljd +++ b/clj/src/cljd/flutter.cljd @@ -455,10 +455,13 @@ (~'createState [_#] (reify :extends widgets/State :no-meta true - (~'build [state# ~closest-context] - (let [~name state#] - (-widget-cont ~(assoc env :key nil :closest-ctx true) ~@forms))) - ^:mixin widgets/TickerProviderStateMixin)))) + (~'build [state# ctx#] + (-build (.-widget state#) state# ctx#)) + ^:mixin widgets/TickerProviderStateMixin)) + StateLifecycle + (~'-build [_# state# ~closest-context] + (let [~(vary-meta name assoc :tag `widgets/TickerProvider) state#] + (-widget-cont ~(assoc env :key nil :closest-ctx true) ~@forms))))) (deftype SpyWidget [k child f] :extends (widgets/StatelessWidget .key k)