Widgets in Flutter have following lifecycle methods associated with them: initState: This method is called when this object is inserted into the tree . This will be called exactly once per State object. Here we can initialize the variables needed for the widget such as AnimationController.29 May 2021