Fork me on GitHub
#matrix
<
2023-06-06
>
kennytilton00:06:41

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?