Open ykrasik opened 1 year ago
Hi @ykrasik! I know you from another package. :wink:
Maybe it could have a builder. I'm not sure if the layout would be redone correctly to fit the new text.
I'll take a look and make some tests. For now, if you need it, TabData
is a ChangeNotifier
that rebuilds TabbedView
if you change the text of the tab.
On that note - it would also be helpful if TabbedViewController
exposed a setTabs
or replaceTabs
method. Currently, it only offers addTab
& removeTab
, but I'd like to be able to make this component managed and store its state outside, and have a callback that would sync that state to the controller. Its a bit of work to achieve this with the only available operations being addTab
, removeTab
& set tabData.text
. This would also cover the "tab title" usecase as I would just replace all tabs on any change to either of the tabs. As an optimization, it'd be nice if the controller could detect that and only update tabData that had changed.
Issue created: "Add setTabs method to TabbedViewController." #28
Hi @caduandrade !
Just started using this package as well, thanks for the hard work and great job at making these libraries!
I'd like to request the ability to make the text title of the tab header a widget. The use case - I'd like to change the tab title based on some of the tab's content. It can be done easily if the title is a MobX Observer widget which renders a Text.