newScreen function
Navigates to a new screen.
The NewScreen function navigates to a new screen specified by the provided Screen function.
context: The context of the current screen.Screen: The function that returns the widget representing the new screen.
Implementation
void newScreen(BuildContext context, Function() screen) {
Navigator.push(context, MaterialPageRoute(builder: (context) => screen()));
}