While implementing persistent bottom bar, previous route need to be restored when a button in the bottom bar was clicked.
When a button in the bottom bar is clicked
To get the current route name example /home or /page try this
ModalRoute.of(context).settings.name