ConsentArtifact.fromJson constructor

ConsentArtifact.fromJson(
  1. Map json_
)

Implementation

ConsentArtifact.fromJson(core.Map json_)
    : this(
        consentContentScreenshots:
            json_.containsKey('consentContentScreenshots')
                ? (json_['consentContentScreenshots'] as core.List)
                    .map((value) => Image.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                    .toList()
                : null,
        consentContentVersion: json_.containsKey('consentContentVersion')
            ? json_['consentContentVersion'] as core.String
            : null,
        guardianSignature: json_.containsKey('guardianSignature')
            ? Signature.fromJson(json_['guardianSignature']
                as core.Map<core.String, core.dynamic>)
            : null,
        metadata: json_.containsKey('metadata')
            ? (json_['metadata'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        userId: json_.containsKey('userId')
            ? json_['userId'] as core.String
            : null,
        userSignature: json_.containsKey('userSignature')
            ? Signature.fromJson(
                json_['userSignature'] as core.Map<core.String, core.dynamic>)
            : null,
        witnessSignature: json_.containsKey('witnessSignature')
            ? Signature.fromJson(json_['witnessSignature']
                as core.Map<core.String, core.dynamic>)
            : null,
      );