What are controllers in Flutter?

In flutter, controllers are a means to give control to the parent widget over its child state.

The main selling point of controllers is that they remove the need of a GlobalKey to access the widget State. This, in turn, makes it harder to do anti-pattern stuff and increase performances.

Controllers also allow having a complex API without having thousands of callbacks on the widget.
They also allow to not “lift the state up”, as the State is still managed by the child.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)