previousScreen method

void previousScreen()

access the last screen that was viewed. it pops the currentScreen and sets the preceding screen to current

Implementation

void previousScreen() {
  if (screenViewHistory.length >= 2) {
    optionsHistory.removeLast();
    screenViewHistory.removeLast();

    notifyListeners();
    // deepClean;
  }
}