changeEmail method
Changes the email address of a logged in user.
NOTE: This function requires that your project is configured with "NEW EMAIL VERIFICATION" turned OFF.
Throws an ApiException if changing emails fails.
TODO(shyndman): Link to API docs (currently missing)
Implementation
Future<void> changeEmail(String newEmail) async {
await _apiClient.post(
'/change-email/',
data: {
'new_email': newEmail,
},
headers: _session.authenticationHeaders,
);
}