This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-06
Channels
- # babashka (40)
- # beginners (14)
- # calva (3)
- # cider (7)
- # clerk (40)
- # clj-kondo (8)
- # cljfx (3)
- # clojure (79)
- # clojure-berlin (1)
- # clojure-denver (14)
- # clojure-europe (30)
- # clojure-nl (6)
- # clojure-norway (21)
- # clojure-uk (4)
- # clojurescript (10)
- # conjure (4)
- # data-science (13)
- # emacs (21)
- # events (8)
- # hoplon (7)
- # hyperfiddle (25)
- # lsp (11)
- # matrix (1)
- # off-topic (110)
- # pathom (11)
- # pedestal (7)
- # reagent (13)
- # reitit (16)
- # ring (10)
- # shadow-cljs (6)
- # timbre (3)
- # vim (8)
- # wasm (3)
So ^^^ I asked ChatGPT how to give a GestureDetector a TickerProvider, since GD is stateless.
Me: In Dart Flutter, how can I give a stateless GestureDetector a TickerProvider, to be used with an AnimationController?
CG: To use a GestureDetector
with an AnimationController
, you can wrap the GestureDetector
within a TickerProviderScope
.
Me: Flutter does not have any such thing as TickerProviderScope.
Aside: The Google has never heard of "TickerProviderScope".
CG: Apologies for the incorrect information. You're right that Flutter doesn't have a TickerProviderScope
class. Instead, you can achieve the desired result by manually providing a TickerProvider
to the GestureDetector
by wrapping it within a TickerMode
widget.
That worked.
The punch line? Nowhere in the https://api.flutter.dev/flutter/scheduler/TickerProvider-class.html does it mention TickerMode, although it mentions all sorts of related classes. Here is the page, tho: https://api.flutter.dev/flutter/widgets/TickerMode-class.html
Anyone know a good bartending school?