تقييمات الطلاب
( 5 من 5 )
١ تقييمات
فيديو شرح 97- Flutter State Management - Provider - select extension method(Arabic) ضمن كورس Flutter شرح قناة Code2Start - Mohamed Fathy Taha، الفديو رقم 97 مجانى معتمد اونلاين
In this lecture I'ill talk about provider select extension method.
Watch a value of type T exposed from a provider, and listen only partially to changes.
select must be used only inside the build method of a widget. It will not work inside other life-cycles, including State.didChangeDependencies.
By using select, instead of watching the entire object, the listener will rebuild only if the value returned by selector changes.
When a provider emits an update, it will call synchronously all selector.
Then, if they return a value different from the previously returned value, the dependent will be marked as needing to rebuild.
source code
https://github.com/code2start/Flutter-State-Management/tree/lesson20-provider-lesson7