Skip to content

Commit

Permalink
fix context passing
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrand committed Nov 24, 2023
1 parent a5dfc79 commit 64dd43e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clj/src/cljd/flutter.cljd
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,13 @@
`(widgets/Padding
.key ~(:env key)
.padding (edge-insets-geometry ~padding)
.child (-widget-cont ~(assoc env :key nil :closest-ctx false) ~@forms)))
.child (-widget-cont ~(assoc env :key nil :closest-ctx true) ~@forms)))

(defn ^:macro-support expand-color [env color forms]
`(widgets/ColoredBox
.key ~(:env key)
.color ~color
.child (-widget-cont ~(assoc env :key nil :closest-ctx false) ~@forms)))
.child (-widget-cont ~(assoc env :key nil :closest-ctx true) ~@forms)))

(defn ^:macro-support expand-height-width [env forms]
(let [dims (take-while (fn [[k]] (case k (:height :width) true false)) (partition 2 forms))
Expand All @@ -537,7 +537,7 @@
.key ~(:env key)
.width ~width
.height ~height
.child (-widget-cont ~(assoc env :key nil :closest-ctx false) ~@forms))))
.child (-widget-cont ~(assoc env :key nil :closest-ctx true) ~@forms))))

(deftype SpyWidget [k child f]
:extends (widgets/StatelessWidget .key k)
Expand Down

0 comments on commit 64dd43e

Please sign in to comment.