Replies: 2 comments 3 replies
-
Signals do not enforce any particular style, just like ValueNotifier/ChangeNotifier does not force a specific architecture. |
Beta Was this translation helpful? Give feedback.
-
Hello! @TC3000 @rodydavis I am currently developing a timer app that allows users to study together. I manage the state using only signals, and for my scale, everything is working well so far. The design is quite similar to Vue 3's Composition API. I define signals either outside or inside classes within the states directory, and they can only be accessed through specific functions (useXXX). ①: Signals defined outside classes I use: In practice, I mostly use patterns ① and ③. Also, for patterns ① and ②, since the widget itself doesn't hold the state, I mainly use StatelessWidgets. When I need to use pattern ③, I use StatefulWidgets. As someone who loves Vue 3, I find this approach very reusable and it significantly reduces the difficulty of Flutter development for me. Once the app is finished, I want to promote the signal package to others. If there are any issues with my current design, I would appreciate it if you could let me know, @rodydavis Thank you very much! movie.mp4 |
Beta Was this translation helpful? Give feedback.
-
What are some of
signals
best practices and is there any architectural approach that is recommended to follow? Where shouldsignals
be located and how do we make them accessible from our flutter code? If possible can we please have this weather example but withsignals
instead offlutter_bloc
https://github.com/felangel/bloc/tree/master/examples/flutter_weatherBeta Was this translation helpful? Give feedback.
All reactions