I just wanna ask few questions
- Should i wrap my normal widget with stateless or stateful when using?
- What is the different of using it as is?
I just wanna build re usable widget and wondering if i should wrap it before re using! Thanks for answering
I just wanna ask few questions
I just wanna build re usable widget and wondering if i should wrap it before re using! Thanks for answering
Copyright © 2021 Jogjafile Inc.
Use
StatelessWidgetif your widget will not change value. For example: If you want to display aContainerwith color red and it is not going to change colour.Use
StatefulWidgetif your widget will change value. For example: If you want to display a number 10, and this number will be increased to 11 or decreased to 9 by pressing a button.