Flutter: Create a new user

Creates a new user.

Examples

Sign up.

final AuthResponse res = await supabase.auth.signUp(
  email: 'example@email.com',
  password: 'example-password',
);
final Session? session = res.session;
final User? user = res.user;

Sign up with additional metadata

final AuthResponse res = await supabase.auth.signUp(
  email: 'example@email.com',
  password: 'example-password',
  data: \{'username': 'my_user_name'\},
);
final Session? session = res.session;
final User? user = res.user;

Sign up with redirect URL

final AuthResponse res = await supabase.auth.signUp(
  email: 'example@email.com',
  password: 'example-password',
  emailRedirectTo: 'com.supabase.myapp://callback',
);
final Session? session = res.session;
final User? user = res.user;