void dispose() Called when this object is removed from the tree permanently . The framework calls this method when this State object will never build again. After the framework calls dispose, the State object is considered unmounted and the mounted property is false.
Read moreHow do you dispose of initState in flutter?
dispose method Null safety
Read more