Why use InheritedWidget while we can use Broadcast Streams | StreamBuilder and Static Variables [closed] Why use InheritedWidget while we can use Broadcast Streams | StreamBuilder and Static Variables [closed] dart dart

Why use InheritedWidget while we can use Broadcast Streams | StreamBuilder and Static Variables [closed]


Streams/Sink definitely are excellent to store a state. There are some existing architectures, such as BLoC which uses them a lot.

But, Streams don't entirely replace InheritedWidget either. InheritedWidget comes with the cool ability to override it's content for only a part of the screen. One cool application of this is Theme.

Generally speaking, Streams are cool to store business logic. But when you need to store UI logic, InheritedWidgets takes the upper hand.