What is difference between BLoC and provider?

So here we can compare the StreamBuilder in Bloc with Consumer in Provider. The difference is that StreamBuilder listens to the stream and fetches the model on every change to rebuild the widget. But Consumer listens as soon as notifyListeners() executes inside the provider class .

Sizin İçin Seçtik  Why super is called first in constructor?

Leave a Reply

Your email address will not be published. Required fields are marked *