Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onGenerateRoute: (settings) {
- // If you push the PassArguments route
- if (settings.name == PassArgumentsScreen.routeName) {
- // Cast the arguments to the correct type: ScreenArguments.
- final ScreenArguments args = settings.arguments;
- // Then, extract the required data from the arguments and
- // pass the data to the correct screen.
- return MaterialPageRoute(
- builder: (context) {
- return PassArgumentsScreen(
- title: args.title,
- message: args.message,
- );
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement