在Flutter中使用Appwrite创建用户时遇List类型不匹配错误
使用Appwrite创建用户时的类型不匹配问题
用户已在Auth模块成功创建,但控制台抛出**“type 'List' is not a subtype of type 'List'”**类型不匹配错误。
代码片段
Future<User> createUser({ required String email, required String password, required String name, }) async { print(email.runtimeType); print(password.runtimeType); print(name.runtimeType); try { User user = await account.create( userId: ID.unique().toString(), email: email.toString(), password: password.toString(), name: name.toString(), ); print(user); return user; } on AppwriteException catch (e) { Get.snackbar("Error", "Failed to create user: $e", colorText: Colors.white); rethrow; // Handle the error } finally { notifyListeners(); } }
错误截图

已创建用户截图

内容的提问来源于stack exchange,提问作者Suresh Yadav
相关产品推荐
相关产品推荐

