Skip to content

Commit

Permalink
Rename :visible to :when
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrand committed Dec 7, 2023
1 parent 527aef5 commit 6f70c52
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 @@ -574,7 +574,7 @@
(defn ^:macro-support expand-visible [env visible forms]
`(widgets/Visibility
.key ~(:env key)
.visible ~visible
.visible (boolean ~visible)
.child (-widget-cont ~(assoc env :key nil :closest-ctx false) ~@forms)))

(defn ^:macro-support expand-height-width [env forms]
Expand Down Expand Up @@ -699,7 +699,7 @@
:color c -- specify the background color; shorthand for (ColoredBox .color c ...)
:width w
:height h -- specify width and and height shorthands for SizedBox
:visible v -- when v is false the subsequent widget is replace by an empty widget (m/SizedBox.shrink)"
:when test -- when test is falsy the subsequent widget is replaced by an empty widget (m/SizedBox.shrink)"
[& body]
`(-widget-cont {} ~@body))

Expand Down Expand Up @@ -749,7 +749,7 @@
:padding (expand-padding env v forms)
:color (expand-color env v forms)
(:height :width) (expand-height-width env (list* k v forms))
:visible (expand-visible env v forms))))
:when (expand-visible env v forms))))

(defmacro -widget-cont
"PRIVATE DONT USE"
Expand Down

0 comments on commit 6f70c52

Please sign in to comment.