BrazeSdkAuthenticationError constructor

BrazeSdkAuthenticationError(
  1. String _data
)

Implementation

BrazeSdkAuthenticationError(String _data) {
  brazeSdkAuthenticationErrorString = _data;
  var brazeSdkAuthenticationErrorJson = json.jsonDecode(_data);

  var codeJson = brazeSdkAuthenticationErrorJson["code"];
  if (codeJson is int) {
    code = codeJson;
  }

  var reasonJson = brazeSdkAuthenticationErrorJson["reason"];
  if (reasonJson is String) {
    reason = reasonJson;
  }

  var userIdJson = brazeSdkAuthenticationErrorJson["userId"];
  if (userIdJson is String) {
    userId = userIdJson;
  }

  var signatureJson = brazeSdkAuthenticationErrorJson["signature"];
  if (signatureJson is String) {
    signature = signatureJson;
  }
}