getType static method

ConsentType? getType(
  1. Map<String, dynamic> json
)

Implementation

static ConsentType? getType(Map<String, dynamic> json) {
  var type = json["consent_message_type"]?.toString() ?? "";
  if (type == "tracking_type") {
    return ConsentType.tracking;
  } else if (type == "contacting_type") {
    return ConsentType.contacting;
  }
  return null;
}