Rank 1: Thread
I have a form that collects user's email, username and password, and then calls the following function to create a user:
Future<void> signup({required String email, required String username, required String password}) async { try { // Create a new user awm.User u = await _account.create(userId: 'unique()', name: username ,email: email, password: password);
// ... } catch (err) { if (err is aw.AppwriteException) { return Future.error(Exception(err.message)); } else { return Future.error(Exception(err.toString())); } } }The problem is that the first instruction in the try-catch block apparently throws an Exception saying Expected a value of type 'List<dynamic>', but got one of type 'Null', even if then checking on the Appwrite console the user is correctly created. Why is that happening, what am I doing wrong?