i
Kellton
Filter interviews by
I applied via LinkedIn and was interviewed before Jul 2021. There was 1 interview round.
Stateless widgets are immutable and don't change over time. Stateful widgets can change their state over time.
Stateless widgets are used for displaying static content.
Stateful widgets are used for displaying dynamic content.
Stateless widgets are faster and consume less memory than stateful widgets.
Stateful widgets have a State object that stores mutable state.
Examples of stateless widgets include Text, Icon, and Image.
...
Stateful widget goes through various stages during its lifecycle.
Stateful widget is created using createState() method.
When the widget is inserted into the widget tree, initState() method is called.
When the widget is updated, didUpdateWidget() method is called.
When the widget is removed from the widget tree, dispose() method is called.
build() method is called whenever the widget needs to be rebuilt.
setState is a method used in stateful widgets to update the state of the widget and trigger a rebuild of the UI.
setState is called with a callback function that updates the state variables.
The callback function is executed asynchronously.
The new state values are merged with the old state values.
The widget is rebuilt with the updated state values.
Top trending discussions
Senior Software Engineer
386
salaries
| ₹5.5 L/yr - ₹21.5 L/yr |
Software Engineer
376
salaries
| ₹1.8 L/yr - ₹10.3 L/yr |
Lead Engineer
160
salaries
| ₹7 L/yr - ₹25 L/yr |
Software Developer
143
salaries
| ₹2.8 L/yr - ₹9.1 L/yr |
Software Quality Analyst
89
salaries
| ₹2.7 L/yr - ₹9 L/yr |
TCS
Infosys
Wipro
HCLTech