Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why it's recommanded to use Bloc pattern in large projects?

I heard it for state management in large projects. It's good to use the Bloc pattern. But every project I know in GitHub and every tutorial that I watched is making a small project like a login page with Bloc. I can't understand why it's recommended to use Bloc in large projects because for making every state and event on a page we should make a new Bloc class that changes events to states. It does not seem very good. can you introduce some large Flutter project that uses Bloc pattern?

like image 923
Mr. ZeroOne Avatar asked Oct 28 '25 15:10

Mr. ZeroOne


1 Answers

It's recommended in large projects because Bloc pattern can separate business logic form UI in a good way which makes project management easier (adding new features, remove, modify) and this something that you will definitely need in large project when you have many files with complex widgets states etc... . However time has change and now we have Riverpod which do the same in a better way with less boilerplate code.

like image 79
Mohammed Alfateh Avatar answered Oct 31 '25 12:10

Mohammed Alfateh