updateProfile static method

Future<AuthResult> updateProfile(
  1. Map map
)

update current user's profile.

Implementation

static Future<AuthResult> updateProfile(Map map) async {
  var body = jsonEncode(map);
  final Result result = await post('/api/v2/users/profile/update', body);
  AuthResult authResult = AuthResult(result);
  if (result.code == 200) {
    authResult.user = await createUser(result);
  }
  return authResult;
}