Flutter-এ বেশ কয়েকটি state management পদ্ধতি রয়েছে — built-in (setState, InheritedWidget) থেকে শুরু করে জনপ্রিয় libraries (Provider, Riverpod, Bloc, GetX) পর্যন্ত। মূল অপশনগুলি, তাদের দর্শন এবং trade-offs বোঝা একটি অ্যাপের জন্য সঠিক পদ্ধতি নির্বাচন করতে সাহায্য করে।
Built-in পদ্ধতিগুলি
setState → local state in a StatefulWidget (simple; doesn't scale to shared state)
InheritedWidget → built-in way to share state down the tree (the foundation many
libraries build on; verbose to use directly)
Provider — সরল এবং সুপারিশকৃত
PROVIDER → official-recommended, built on InheritedWidget; simple, widely used:
→ provide state at a point in the tree; descendants "watch"/consume it
→ ChangeNotifier holds state and notifies listeners → UI rebuilds on change
→ good for many apps; gentle learning curve
