I want to redirect to another page using Navigator.pushNamed but I am getting an error.
This is exactly the error I get;
The method \'findAncestorState