Sign Up / Create A New Customer
You can create ( sign up ) a new customer in your store using the create()
method, it creates the customer in the store and return a CustomerCreationResponse
which will contains all the new created user details.
Using await
/async
:
CustomerCreationResponse customerCreationResult = await YouCan.instance.customers.create(
email: "YOUR EMAIL HERE",
password: "YOUR PASSWORD HERE",
confirmPassword: "THE PASSWORD CONFIRMATION HERE",
optionalUserInformations: OptionalUserInformations(
firstName: 'FIRST NAME',
lastName: 'LAST NAME',
city: 'CITY',
country: 'COUNTRY',
notes: 'NOTES',
region: 'REGION',
),
);
The optionalUserInformations
is not required and you can ignore it if you don't need to collect those informations from your customers.