Home > database >  Best for State management in flutter
Best for State management in flutter

Time:07-01

I am a beginner, which is best for State management in flutter? Which One do I have to learn?

CodePudding user response:

I will recommend useing getx. It is very easy to learn and provide more functionality like navigations.

Getx is flutter favourite and most liked package in pub.dev

CodePudding user response:

There is no best state management. They all do the same job. We can only say that the usage patterns are different. For example, Getx is a package that contains many things, like a stand-alone framework. It contains many ready-made functions and plugins. At first this may seem like a good thing. However, as a software developer, it is a problem to be so dependent on a package. (I've been using getx for over a year because of my job.)

Provider, on the other hand, says that the provider is complicated by its manufacturer and the new state management package Riverpod is better.

Bloc is plain, simple and everything is clear. However, if you do not use cubit, it is a tiring package, but in cubit there is no freedom in bloc.

So as you can see, there is no such thing as the best state management. All of them have their own pros and cons. I think the important thing is which one you can get used to faster and use it well.

CodePudding user response:

There is so many state management in flutter like Provider, GetX, BLoC, flutter_bloc , rxdart, mobx .etc... My personnel suggestion is Provider. You can use it for small projects to complex projects. And it is easy to understand. The provider is the most-liked and flutters favorite package.

Provider - https://pub.dev/packages/provider

All the best for your career !!!

CodePudding user response:

I would recommend using BloC - https://bloclibrary.dev

CodePudding user response:

As a beginner I got the furthest and felt I learned the most the quickest by using Provider / ChangeNotifier - bloc etc. got very confusing, while Provider helped me get to understand much more about the Flutter framework and paradigm - and there are great quick overviews and different approaches to it on YouTube. (I liked these.)

CodePudding user response:

A simple state management provider is offered by Flutter. https://docs.flutter.dev/development/data-and-backend/state-mgmt/simple

CodePudding user response:

There is no single best statemanagement. As a beginner I would recommend doing everything by hand, so you know what you are actually doing and know what you are missing. Once you know what you need head over to the flutter documentation to find a boatload of recommendations.

CodePudding user response:

BLOC is best for beginner,according to my idea,It has clear documentaion well maneged easy to learn

https://pub.dev/packages/flutter_bloc

And also, BLOC PATTERN is a architecture for your project. Easy to manage your project https://medium.com/flutterpub/architecting-your-flutter-project-bd04e144a8f1

You can find best state management available for flutter

https://docs.flutter.dev/development/data-and-backend/state-mgmt/options#bloc--rx

GOOD LUCK FOR YOU CARRIER !!

  • Related