Hey guys, I’m trying to register a new user with Flutter.
Android works perfectly fine, but iOS doesn’t…
Here’s the error description:
[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: PlatformException(3011, Property ‘password’ is required, {NSLocalizedDescription: Property ‘password’ is required})
And this is my code:
-
First, I created this function inside my State class:
void register(String email, String password, String name, String phoneNumber) {
BackendlessUser user = BackendlessUser();
user.email = email;
user.password = password;
user.setProperty(“name”, name);
user.setProperty(“phoneNumber”, phoneNumber);
Backendless.userService.register(user).then((registeredUser) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => TyC(),
),
);
});
} -
Then, I call it when a button is pressed:
register(email, password, name, phoneNumber);
Some useful information is that the login works just as expected both in iOS and Android. I can also get all the information of any user that is already registered in my database from both platforms. The only problem is when I attempt to register a new user in an iOS device or simulator. I have already updated everything in the podfile and the problem persists. And when I run flutter doctor, it says there are no errors. I also checked that my Key ID and iOS and Android API Key are correct.
What can I do?
I need your help!
Thanks!