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

Forms in Flutter (Validator and UI)

Darts: Darts 101 for Flutter

Flutter 104 Introduction to BLOC