Answers for "flutter how to setstate just one widget instead of the whole screen"

0

flutter how to setstate just one widget instead of the whole screen

Can I use setState for just one widget rather than whole page?
    --> You can use a StatefulBuilder for that. A StatefulBuilder gives you a separated setState as a builder parameter, and that setState will only affect the state under the builder.
    Flutter API Documentation has a very clear example for that at https://api.flutter.dev/flutter/widgets/StatefulBuilder-class.html.
Posted by: Guest on March-05-2022

Code answers related to "flutter how to setstate just one widget instead of the whole screen"

Browse Popular Code Answers by Language