updateUser method
Changes the given properties of the user uid and returns the user as stored. A null argument leaves the
property as it is. Throws user-not-found and the errors of createUser.
Implementation
Future<AdminUser> updateUser(
String uid, {
String? email,
String? password,
bool? emailVerified,
String? displayName,
String? photoUrl,
String? phoneNumber,
bool? disabled,
}) async {
_checkOpen();
_checkUid(uid);
_checkProperties(
email: email,
password: password,
displayName: displayName,
photoUrl: photoUrl,
phoneNumber: phoneNumber,
);
await _identityToolkit('accounts:update', <String, Object?>{
'localId': uid,
'email': ?email,
'password': ?password,
'emailVerified': ?emailVerified,
'displayName': ?displayName,
'photoUrl': ?photoUrl,
'phoneNumber': ?phoneNumber,
'disableUser': ?disabled,
});
return getUser(uid);
}