tab_switcher icon indicating copy to clipboard operation
tab_switcher copied to clipboard

Updating title dynamically?

Open rodydavis opened this issue 3 years ago • 6 comments

Love the library! Curious how to change the title for the current tab on the fly?

rodydavis avatar Sep 12 '22 02:09 rodydavis

Thanks.

For now there is no way of doing that. Also, titles and subtitles were supposed to become widgets in the future. I think when they become widgets it will be easier to implement such a feature.

Active development of this library has stopped as an MVP based on it didn't really get past prototypes. But I would happily accept PRs and I'm hoping to start working on something that involves this UI paradigm in future.

nuc134r avatar Sep 12 '22 08:09 nuc134r

For now there is no way of doing that

...using stock widgets. You can actually subclass TabSwitcherTab with title changing feature and supply your own set of widget builder methods in TabSwitcherWidget which would support that by listening to custom streams from your TabSwitcherTab. That's would require some work but is achievable. This lib is actually very customizable and only provides root mechanism, just like Scaffold and a set of basic views which can be overridden using builders.

nuc134r avatar Sep 12 '22 09:09 nuc134r

Yeah I opened an issue because I started a fork. I also have added theme options too. I'll make some PRs soon.

I have an app with a lot of screens and needing multitasking and this worked really good.

I just added the project as a submodule instead of pub.dev for faster iteration.

But wanted to say thank you and great job on it!

rodydavis avatar Sep 12 '22 15:09 rodydavis

Nice to hear it helps. Good luck and thank you!

nuc134r avatar Sep 12 '22 18:09 nuc134r

Here is the PR! Feel free to close:

https://github.com/nuc134r/tab_switcher/pull/2

Here is an online demo:

https://hymns-for-worship.github.io/tab_switcher/

rodydavis avatar Sep 13 '22 07:09 rodydavis

Screen Shot 2022-09-13 at 12 12 39 AM Screen Shot 2022-09-13 at 12 12 32 AM

rodydavis avatar Sep 13 '22 07:09 rodydavis