userTrace method

Future<Response> userTrace({
  1. String? id,
  2. String? email,
  3. int? gender,
  4. String? birth,
  5. String? phone,
  6. String? area,
  7. String? applicationId,
  8. String? ver,
})

Implementation

Future<http.Response> userTrace({
  String? id,
  String? email,
  int? gender,
  String? birth,
  String? phone,
  String? area,
  String? applicationId,
  String? ver,
}) async {

  var payload = {
    "ver": ver ?? '',
    "application_id": applicationId ?? '',
    "id": id ?? '',
    "email": email ?? '',
    "gender": "${gender ?? -1}",
    "birth": birth ?? '',
    "phone": phone ?? '',
    "area": area ?? ''
  };

  var aes256 = BootpaySimpleAES256();
  var data = {
    "data": aes256.strEncode(json.encode(payload)),
    "session_key": aes256.getSessionKey()
  };

  var uri = Uri.parse('$defaultUrl/login');
  return await http.post(
      uri,
      body: data
  );
}