State

initState() is a method which is called once when the stateful widget is inserted in the widget tree. 
We generally override this method if we need to do some sort of initialisation work like registering a listener because unlike build() this method is called once. 
And to unregister your listener (or doing some post work), you override dispose()method.

Comments

Popular posts from this blog

Flutter Widget 101 Part 1 (Basic of Flutters, Layouts, Rows and Columns)

Flutter Widget 101 Part 2 (List and Stack)

Animation Class: AppBar and Tabbar