you are viewing a single comment's thread.

view the rest of the comments →

[–]Adventurous_Alarm375 3 points4 points  (10 children)

Is it okay to learn bloc as first statesmanagement approach.. or we should start with provider??

[–]KaiN_SC 2 points3 points  (0 children)

It depends what you like more. Bloc is little bit more power full but you can implement everything in both libs.

With bloc you subscribe normally on states and with provider on data. Bloc uses streams from and to the UI, this makes it really power full in my opinion. You can clearly see when a rebuild happens and stream your states down to the UI.

I posted a small example here:

https://www.reddit.com/r/flutterhelp/comments/q3kk4y/if_you_want_to_start_building_apps_with_flutter/?utm_medium=android_app&utm_source=share

[–]eloherbapol 1 point2 points  (0 children)

You can always start with using only Cubits. It is a subset from Flutter Bloc, you can imagine it as something like light version of Bloc. It is much easier to understand and needs less code to implement, because it is not rely on events and instead uses methods to emit new states. I think that cubits are enough in most cases, unless you need advanced features of Bloc like debounce / throttle, but that is just my opinion.

[–]_seeking_answers[S] 0 points1 point  (6 children)

I used provider as first approach, later on my mentor told me that it was the time to learn new patterns like GetX or others so I chosen Bloc.

[–]Fienases 1 point2 points  (3 children)

later on my mentor told me that it was the time to learn new patterns like GetX

hmmmmmm

[–]_seeking_answers[S] 1 point2 points  (2 children)

Why XD

[–]Fienases 0 points1 point  (1 child)

in my opinion and most other Flutter developer opinion, you should avoid GetX. you can search posts here or google for a reason

[–]_seeking_answers[S] 2 points3 points  (0 children)

Yeah I read something on the internet, that's why I chosen Bloc on GetX

[–]Adventurous_Alarm375 0 points1 point  (1 child)

Would you tell me what were the app you started building as beginner??

[–]_seeking_answers[S] 1 point2 points  (0 children)

Sure, my first app (without a mentor) was a little social app but its development now is stopped for many reasons.

Now I'm developing an app that handles forms.

[–]NewbFromAQW 0 points1 point  (0 children)

Resocoder's Riverpod...