Difference between StatelessWidget and StatefulWidget
| Feature | StatelessWidget | StatefulWidget |
|---|---|---|
| Definition | Can’t change once built | Can change at runtime |
| State | No internal state | Has a mutable state |
| Use case | Static UI | Dynamic UI |
| Example | Text, Icon | Form, Switch, Checkbox |
Comments
Post a Comment