Home > Enterprise >  How to pass argument using getx?
How to pass argument using getx?

Time:05-19

Get.rootDelegate.toNamed('/note', arguments: 'test_data');

Get.arguments <= It makes null.

How can I solve this problem?

CodePudding user response:

I think you migh be missing something. While you're setting this parameters using the rootDelegate

onPressed: () => Get.rootDelegate.toNamed(Routes.RECEIVER, arguments: true, parameters: {'bool': 'true'}),

You try to retrieve them from the Get context:

Get.arguments

You should be using:

Get.rootDelegate.parameters

Get.rootDelegate.parameters will work

CodePudding user response:

Why do you use Get.rootDelegate.toNamed('/note', arguments: 'test_data');?

instead of Get.toNamed('/note', arguments:'test_data');

  • Related