Stateful Vs Stateless Widget
I. In Brief: Stateless: Parent widget help to set Children State (Raised Button, Text and Icon) Stateful: Not regulated by parent, regulated itself by watching for any changes and updating the state (setState()). II. Stateless: Both are stateless. Stateful is associated with a state and is immutable (stateless). Parent's Widget Relationship with Child's Widget The parent widget is stateless because it does not care about its child's state. The stateful child itself (or technically Flutter) will take care of its own state. III. Type of Widget: Stateless: Raised Button, Text and Icon Stateful: User interaction; form, slider & widget that changes over time, data feed causes the UI to update; Checkbox, Radio, Slider, InkWell, Form, and TextField IV. Re-render: Stateless: Depend on external data Stateful: depend on internal state and re-render when input data or Widget's state changes. V. Lifecycle Stateful: Recycle Widget but...