Really nice video. Loved the way you explaied everything. I was wondering if you could do a part 2 to this video where you can give tips on how to structure your project when using Signals, some uncovered topics like effect, untracked, batch, etc.. Would love a part 2 to this.
which is useful for a parent checkbox being true when all children are selected, false when no children are selected, or null when some children are selected
At 22:20, since you're already using records, I presume you're firmly in dart 3 territory, so why not use a switch-expression to remove the noisy repeated "return"?
Yes. To be fair, my focus for this video was the signals package and I didn’t want to throw too many concepts out there buttt yeah, a pattern match would certainly be cleaner there!
There's no reason it needs to be global - but usually with state management you want to access things that are outside a specific widget. Otherwise, you could just use a StatefulWidget and call it a day. In a real application, I wouldn't just have the signals at the top of a file - they'd be tucked away somewhere in a more organized manner.
would SignalList update when one of its content has been updated? or it just update on insert and remove? because in your example you used typedef which doesn't have setters for the fields so you had to make a new instance and replace the old one with it.
When the list is modified, the signal will emit. This is my understanding of it from the examples and my fiddling. I didn’t change an item in the list, instead I replaced something in the list with a new item (similar to the original one at that position)
As a follow-up video, it'd be great to see how to utilize Signals in a clean architecture setup.
I love it... Signals are awesome...
They are declarative, way less boilerplate than bloc and it's not generated like riverpod...
Really nice video. Loved the way you explaied everything. I was wondering if you could do a part 2 to this video where you can give tips on how to structure your project when using Signals, some uncovered topics like effect, untracked, batch, etc.. Would love a part 2 to this.
Thanks for the feedback! I’ll see what I can do :)
I like your explanation so clear and crisp.
Thanks!
Wonderful tutorial Tyler
Thanks!!
I assume the null state of the check box would be to support tristate mode
which is useful for a parent checkbox being true when all children are selected, false when no children are selected, or null when some children are selected
That makes sense! Thank you :)
It looks simpler and more convenient compared to other state management frameworks, but why are there so few people using it?
It seems to have a pretty good reputation on pubdev. However, nothing is going to stop bloc from being the goto for most people.
At 22:20, since you're already using records, I presume you're firmly in dart 3 territory, so why not use a switch-expression to remove the noisy repeated "return"?
Yes. To be fair, my focus for this video was the signals package and I didn’t want to throw too many concepts out there buttt yeah, a pattern match would certainly be cleaner there!
Thanks for the review 🎉
Hey! Thanks for watching and for your work on this awesome package!
Wow That is Intresting have you test in bigger project ?
No, I use riverpod on pretty much all my projects. This could be a contender in the future though!
i noticed that signals have similar approch to riverpod with declaring variable as global variables - that's intersting
There's no reason it needs to be global - but usually with state management you want to access things that are outside a specific widget. Otherwise, you could just use a StatefulWidget and call it a day.
In a real application, I wouldn't just have the signals at the top of a file - they'd be tucked away somewhere in a more organized manner.
Good explanation. What is the extension name to get thoose left-side lines?
Thanks! IIRC It's part of the dart extension - you just need to enable "dart.previewFlutterUiGuides": true in your settings.json
stackoverflow.com/questions/58032083/how-can-i-get-tree-like-indentation-for-flutter-code-in-vs-code
is this good then riverpods?
I prefer riverpod mostly because I’ve used it a lot more. But that could change if I get more comfortable with it.
I think this state management is inspired by GextX,
It's inspired by preact signals. (javascript)
Thanks bro, I have used GetX in a couple of project before, it has similarities when comes to state listening in UI@@TylerCodes
would SignalList update when one of its content has been updated? or it just update on insert and remove? because in your example you used typedef which doesn't have setters for the fields so you had to make a new instance and replace the old one with it.
When the list is modified, the signal will emit. This is my understanding of it from the examples and my fiddling. I didn’t change an item in the list, instead I replaced something in the list with a new item (similar to the original one at that position)
What app do u use to screen record?
Generally I use Screenflick - sometimes I use OBS.
I learnt something new, "length" in the American accent the g makes a sound!
Haha. I have a Canadian accent technically, but there's a lot of overlap with the country below me.