What is initState and super.initState in flutter?
Credit to @Remi, 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 … Read more