So I'm importing data using private api and trying to implement some of the data into variables -
lastName: getJsonField((verifyEmail?.jsonBody ?? ''), r'''$.lname''',).toString();
lastName for example in the debugger - doesn't get a value for some reason, it Cannot evaluate it while if i look up only the expression
getJsonField((verifyEmail?.jsonBody ?? ''), r'''$.lname''',).toString()
I'll get the value that i intend to get. Anything wrong with the way im trying to save it in vars?
CodePudding user response:
For some reason, flutter doesn't imply the value of the jsonField into the new variable, happens specifically when trying to push variables to other pages
Solution:
lastName: AuthCandCall.authLname(api?.jsonBody ?? '').toString();
AuthCandCall - the api response endpoint's name
authLname - specifically one of the parameter from the api's response