I just started working with Flutter and I'm not gonna lie its amazing. One "problem" I have encountered, though, is that when you hit the back key It will navigate to the previous screen. I know that thats what should happen, but how can I change that? Also, the appBar button does the same, so I'm looking for a "fix" for that one as well.
If you require any code, please, let me know! Have a great day, and sorry for any misspellings!
You can use
Navigator.of(context).pushNamedAndRemoveUntil(
'/', (Route<dynamic> route) => false);
Create a named route '/' that corresponds to the main screen and done. Any more queries feel free to ask