Set saveState to make the last state of the app automatically be safed.
void Function(String state)? saveState;