I have two screens A and B. I clicked a button from A and open B screen. When opened B screen I choose something and go back to A screen with:
Navigator.pop(context, MaterialPageRoute(builder: (context) => A(data: data)));
but it doesn't work.
How can go back to the previous screen with data using pop or similar things?