Closed NTMS2017 closed 3 years ago
In my route:
SailorRoute( name: "/ACCOUNT_DETAILS", builder: (context, args, params) => AccountDetails(), customTransition: MyCustomTransition(), defaultTransitions: [ SailorTransition.slide_from_bottom, SailorTransition.zoom_in, ], params: [ SailorParam<String>( name: 'userAccountNo', defaultValue: "...", ), SailorParam<String>( name: 'userAccountType', defaultValue: "...", ), ], ),
Passing the actual parameter when navigating to the new route:
Future<void> _navigationToAccountsDetailPage() async { await Future.delayed(Duration(milliseconds: 400), () async { Routes.sailor.pop(true); await Routes.sailor.navigate("/ACCOUNT_DETAILS", params: {"userAccountNo": _userAccountNo, "userAccountType": _userAccountType}); }); }
This also printed empty
@override void didChangeDependencies() { super.didChangeDependencies(); final _userAccountNo = Sailor.param<String>(context, 'userAccountNo'); final _userAccountType = Sailor.param<String>(context, 'userAccountType'); print("_userAccountNo: $_userAccountNo"); print("_userAccountType: $_userAccountType"); }
But how can I retrieve the values in opened (AccountsDetailPage) page in initState??
In my route:
Passing the actual parameter when navigating to the new route:
This also printed empty
But how can I retrieve the values in opened (AccountsDetailPage) page in initState??