Give the jump's post-frame callback nothing to return
`Scrollable.ensureVisible` answers a `Future`, and it was the tail of the `addPostFrameCallback` body — a value out of a callback typed void, which Dart refuses at compile time and which took the Flutter build down. Every other callback here ends in `nil`; this one does now too. The jump itself is unchanged: it is still awaited by nobody, because nothing here is waiting for the scroll to finish. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
6ab08e7 parent: f751b7d modified
flutter/src/frq/hiccup.cljd +5 -1 | @@ -309,7 +309,11 @@ | ||
| 309 | 309 | ;; that may be gone. |
| 310 | 310 | (reset! jump-context nil) |
| 311 | 311 | (when (.-mounted c) |
| 312 | - (m/Scrollable.ensureVisible c .alignment 0.3)))))) | |
| 312 | + (m/Scrollable.ensureVisible c .alignment 0.3))) | |
| 313 | + ;; The callback is void and `ensureVisible` answers a Future: returned | |
| 314 | + ;; from the tail, it is a value out of a function that has none to give, | |
| 315 | + ;; and Dart says so at compile time rather than here. | |
| 316 | + nil))) | |
| 313 | 317 | |
| 314 | 318 | (defn- fills-column? |
| 315 | 319 | "Whether a node takes the height its column has left over. |
| @@ -309,7 +309,11 @@ | |||
| 309 | ;; that may be gone. | 309 | ;; that may be gone. |
| 310 | (reset! jump-context nil) | 310 | (reset! jump-context nil) |
| 311 | (when (.-mounted c) | 311 | (when (.-mounted c) |
| 312 | - (m/Scrollable.ensureVisible c .alignment 0.3)))))) | 312 | + (m/Scrollable.ensureVisible c .alignment 0.3))) |
| 313 | + ;; The callback is void and `ensureVisible` answers a Future: returned | ||
| 314 | + ;; from the tail, it is a value out of a function that has none to give, | ||
| 315 | + ;; and Dart says so at compile time rather than here. | ||
| 316 | + nil))) | ||
| 313 | 317 | ||
| 314 | (defn- fills-column? | 318 | (defn- fills-column? |
| 315 | "Whether a node takes the height its column has left over. | 319 | "Whether a node takes the height its column has left over. |