updateEmail method

Future<Response> updateEmail(
  1. String email,
  2. String newEmail,
  3. dynamic jwt
)

updates the email from a user in the users services and returns Future<http.Response>

Implementation

Future<http.Response> updateEmail(String email, String newEmail, jwt) {
  var url = wsURL + 'update/email';
  return http.put(Uri.parse(url),
      headers: {HttpHeaders.authorizationHeader: 'Bearer ' + jwt},
      body: {'email': email, 'newEmail': newEmail});
}