Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to pass params? #25

Closed
wesleytoshio opened this issue Mar 24, 2020 · 1 comment
Closed

how to pass params? #25

wesleytoshio opened this issue Mar 24, 2020 · 1 comment

Comments

@wesleytoshio
Copy link

i need help to pass params for another page.

Get.toNamed('/view_folder', {title:'page name'} )
@jonataslaw
Copy link
Owner

i need help to pass params for another page.

Get.toNamed('/view_folder', {title:'page name'} )

Get.toNamed('page', arguments: {'title': 'page name'});

And you can recover like this:
var args = Get.args(context); // You can put this into the build method

This example of Map you could retrieve like this:
Text(args['title'])

But you don't necessarily need to pass a Map like most libs, you can pass anything through of Get arguments, even a widget or class if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants