just call this canPop() method and it would return true if this route can be popped and false if it’s not possible.
bool canPop() => Navigator.canPop(this);