Interview frequency: …
Short answer
ValueNotifier suits a single value with a setter and notification, while ChangeNotifier is more suitable when you have a model or more than one field and related operations.
Explanation
Start with the simplest: ValueNotifier<T> for small state, and ChangeNotifier when you need methods and reading more than one value. Both need a clear owner and dispose, and neither alone solves async or persistence.
Code example
final selectedTab = ValueNotifier<int>(0);
selectedTab.value = 1;Common mistakes
- Changing the contents of a mutable value inside a ValueNotifier without replacing the value.
- Using one huge ChangeNotifier for every feature in the app.