Complete the code to navigate to a new screen using Navigator.
Navigator.of(context).[1](MaterialPageRoute(builder: (context) => NewScreen()));The push method adds a new screen on top of the current one, showing the new screen.
Complete the code to return to the previous screen.
Navigator.of(context).[1]();The pop method removes the current screen and returns to the previous one.
Fix the error in the code to navigate and replace the current screen.
Navigator.of(context).[1](MaterialPageRoute(builder: (context) => HomeScreen()));pushReplacement replaces the current screen with a new one, which is useful to avoid stacking screens.
Fill both blanks to navigate back until a specific screen is reached.
Navigator.of(context).[1]((route) => route.[2].name == '/home');
popUntil pops screens until the condition is met. The settings property holds route info like the name.
Fill all three blanks to create a named route navigation with arguments.
Navigator.of(context).[1]('[2]', arguments: [3]);
pushNamed navigates using a route name. The route name is /details. Arguments can be passed as a map like {'id': 42}.