signUp method

  1. @override
Future<String> signUp(
  1. String email,
  2. String password
)
override

Implementation

@override
Future<String> signUp(String email, String password) async {
  final id = ID.unique();
  try {
    final user = await _account.create(
      userId: id,
      email: email,
      password: password,
    );
    debugPrint('User signed up: ${user.$id}');
    return id;
  } on AppwriteException catch (e) {
    throw Exception('Failed to register user: ${e.message}');
  }
}