defaultAttributionSerializeBuilder method

Map<String, dynamic>? defaultAttributionSerializeBuilder(
  1. Attribution attribution
)

默认属性序列化构建器

Implementation

Map<String, dynamic>? defaultAttributionSerializeBuilder(
    Attribution attribution) {
  ///特殊Attr属性添加
  if (attribution is LinkAttribution) {
    return {
      keyAttributionId: attribution.id,
      keyAttributionLink: attribution.url.toString(),
    };
  } else if (attribution is NamedAttribution) {
    return {
      keyAttributionId: attribution.id,
      keyAttributionName: attribution.name,
    };
  }
  return null;
}