registerPerson method

Future registerPerson(
  1. String atsign,
  2. String email, {
  3. String? oldEmail,
})

Implementation

Future<dynamic> registerPerson(String atsign, String email,
    {String? oldEmail}) async {
  if (!initialized) {
    _init();
  }
  Map data;
  String path = AppConstants.apiPath + AppConstants.registerPerson;
  if (oldEmail != null) {
    data = {'email': '$email', 'atsign': "$atsign", 'oldEmail': '$oldEmail'};
  } else {
    data = {'email': '$email', 'atsign': "$atsign"};
  }

  var response = await postRequest(path, data);
  return response;
}