Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controlled Widget #17

Open
cstsortan opened this issue Aug 27, 2020 · 5 comments
Open

Controlled Widget #17

cstsortan opened this issue Aug 27, 2020 · 5 comments

Comments

@cstsortan
Copy link

it would be much better if it could be refactored into a controlled widget with a property like currentIndex, where setState() would trigger the animation etc. and not internally through tap

@eric-taix
Copy link
Owner

I agree, many users would like to have a controller. I will try to take some time to add it in a future version.

@cstsortan
Copy link
Author

I don't mean a controller, I mean a property that will react to changes reactively

@eric-taix
Copy link
Owner

But doesn't a controller would do this job? In Flutter controllers aim to control behaviour of the widget no?

@cstsortan
Copy link
Author

Yes if that's easier to implement. But controlling the widget with a property through setState(), is the right way for a reactive framework, cause maybe the developer is using a global state container like redux, and doesn't want to expose the entire controller object, which is tightly coupled with the widget itself. Actually TextField should be working like that.
No matter how convenient a Controller is, it's a pain in big apps

@neffex97
Copy link

controller still not added? i need when user change page from drawer,bottombar also changed,so i think adding controller to this package would be good option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants