Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Provider vs ViewModel

Learning more about the Provider and ChangeNotifier architecture, I find it really similar to the old good MVVM architecture, where a Widget is the View and gets notified for changes by the ViewModel, which is the ChangeNotifier, linked by a Consumer and a Provider.

Why isn't this called MVVM for Flutter then? Are there any actual differences between those two architectures?

like image 768
Michel Feinstein Avatar asked Dec 11 '22 02:12

Michel Feinstein


1 Answers

provider is by no mean an architecture. It's an ingredient.

There's absolutely nothing forcing you to use ChangeNotifier when using Provider.

You can use it in combination with other things, including Mobx, BLoC, Redux, ...

like image 50
Rémi Rousselet Avatar answered Dec 28 '22 23:12

Rémi Rousselet