Hi all,
I'm learning life cycle in widgets.
I print the value of boolean property mounted in constructor
method, initState()
method, build()
method, deactivate()
method and dispose()
method.
In dispose()
method, it prints the value as true
. how can it be? because, dispose()
method suppose to remove the widget from the widget tree.
@override
void dispose() {
super.dispose();
print("dispose() secondPage mounted: "+ this.mounted.toString());
}
this prints dispose() secondPage mounted: true
can anyone explain how this happens?