Using this approach as we need to keep track of screens before this one and keep track of screens previous to the current one.
List<String> screenNames = [];