I am using parse_server_sdk in flutter mobile to signup a user in an app. Ideally, you can call the ParseUser.createUser(username, password, email)
function to do this. My question is that I have added columns firstname
and lastname
to the User
class via back4app console so my users have additional fields besides what is provided out of the box. I intend to make these columns required which means they need to be set when a user is created in the app. The problem is I cannot find (or I am unaware of) a function within ParseUser
that allows you to include other parameters beyond username, password and email. My current workaround is to:
It just seems a bit awkward to do it this way. Is there a more straightforward way to do this that I haven't considered?
The following code should work:
final user = ParseUser.createUser(username, password, email)
..set('firstname', firstname)
..set('lastname', lastname);
await user.signUp();