Register_Form - Only pass 1 JSON object to API
This commit is contained in:
parent
63f275776d
commit
94583b4ffc
1 changed files with 12 additions and 9 deletions
|
@ -84,15 +84,18 @@ class RegisterFormState extends State<RegisterForm> {
|
|||
'') {
|
||||
showAlertDialog(context);
|
||||
} else {
|
||||
var statusCode = await registerPost(
|
||||
firstName: _formKey.currentState!
|
||||
.fields["First Name"]!.value,
|
||||
lastName: _formKey.currentState!
|
||||
.fields["Last Name"]!.value,
|
||||
email: _formKey.currentState!
|
||||
.fields["Email Address"]!.value,
|
||||
password: _formKey.currentState!
|
||||
.fields["Password"]!.value);
|
||||
Map<String, dynamic> data = {
|
||||
"first_name": _formKey.currentState!
|
||||
.fields["First Name"]!.value,
|
||||
"last_name": _formKey
|
||||
.currentState!.fields["Last Name"]!.value,
|
||||
"email": _formKey.currentState!
|
||||
.fields["Email Address"]!.value,
|
||||
"password": _formKey
|
||||
.currentState!.fields["Password"]!.value
|
||||
};
|
||||
|
||||
var statusCode = await registerPost(data);
|
||||
|
||||
if (statusCode == 200) {
|
||||
Navigator.push(
|
||||
|
|
Loading…
Add table
Reference in a new issue