Skip to main content

updateUser method

Future<bool> updateUser (User updatedUserDetails)

This function is used to update the user details.

params:

  • updatedUserDetails : User type variable containing all the details of an user need to be updated.

Implementation

Future<bool> updateUser(User updatedUserDetails) async {
try {
_currentUser = updatedUserDetails;
saveUserInHive();
graphqlConfig.getToken();
databaseFunctions.init();
return true;
} on Exception catch (e) {
debugPrint(e.toString());
return false;
}
}