Call this in the State object's initState() function.
void initState(StateX? state) => pushState(state);