How to pass argument using getx?

692

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

Share:
692
K.k
Author by

K.k

Updated on January 04, 2023

Comments

  • K.k
    K.k over 1 year
    Get.rootDelegate.toNamed('/note', arguments: 'test_data');
    
    Get.arguments <= It makes null.
    

    How can I solve this problem?

    • zetsu010
      zetsu010 almost 2 years
      To the seconde page make:final title = Get.arguments as String;