I have a situation where I want to display different app bar actions based on StoreConnector.
However, I don't want to build the entire Scaffold when the state changes, only the AppBar.
Options I tried / thought of:
Since StoreConnector isn't a PreferredSizeWidget, which is what the appBar argument to Scaffold expect, I can't wrap the entire appbar.
The actions argument expect a list, so I can't wrap that either.
I thought on making a StoreConnector for each possible action, even though that may be null, but we can't return null; so that's not an option.
I have a situation where I want to display different app bar actions based on
StoreConnector
. However, I don't want to build the entireScaffold
when the state changes, only theAppBar
.Options I tried / thought of:
StoreConnector
isn't aPreferredSizeWidget
, which is what theappBar
argument toScaffold
expect, I can't wrap the entire appbar.actions
argument expect a list, so I can't wrap that either.StoreConnector
for each possible action, even though that may be null, but we can't return null; so that's not an option.Example of what I would of wanted
What should I do about it?