only one class which extends with StatelessWidget. They can never re-run build() method again. Stateful : Widgets can update their STATE (locally) & values multiple times upon event triggered. That's the reason, the implementation is also different. In this, we have 2 classes, one is StatefulWidget & the other is it's State implementation handler i.e. State. So if I say, they can re-run build() method again & again based on events triggered. A StatelessWidget will never rebuild by itself (but can from external events). A St
atefulWidget can.
A StatelessWidget is static wheres a StatefulWidget is dynamic.
Q9: Differentiate between Hot Restart and Hot Reload? GET START Mid Top 68 Flutter Interview Questions Flutter 68 Answer Hot Reload Flutter hot reload features works with combination of Small r key on command promp
t or Terminal.
Hot reload feature quickly compile the newly added code in our file and sent the co
de to Dart Virtual Machine. After done updating the Code Dart Virtual Machine updat
e the app UI with widgets.
Hot Reload takes less time then Hot restart.
There is also a draw back in Hot Reload, If you are using States in your applicatio
n then Hot Reload preservers the States so they will not update on Hot Reload our
set to their default values.
Hot Restart Hot restart is much different than hot reload.
In Hot restart it destroys the preserves State value and set them to their default.
So if you are using States value in your application then after every hot restart
the developer gets fully compiled application and all the states will be set to the
ir defaults.
The app widget tree is completely rebuilt with new typed code.
Hot Restart takes much higher time than Hot reload.
Q10: Differentiate between required and optional parameters in Dart