VaultEntry.fromJson constructor
Read this payload from a decoded JSON object.
Implementation
factory VaultEntry.fromJson(Map<String, dynamic> json) => VaultEntry(
id: json['id'] as String,
contextId: json['contextId'] as String,
targets: (json['targets'] as List<dynamic>).map((e) => e).toList(),
label: json['label'] as String,
secretKind: SecretKind(json['secretKind'] as String),
tags: json['tags'] == null
? null
: (json['tags'] as List<dynamic>).map((e) => e as String).toList(),
notes: json['notes'] as String?,
favicon: json['favicon'] as String?,
selectors: json['selectors'] == null
? null
: (json['selectors'] as List<dynamic>)
.map((e) => e as String)
.toList(),
customFieldNames: json['customFieldNames'] == null
? null
: (json['customFieldNames'] as List<dynamic>)
.map((e) => e as String)
.toList(),
attachments: json['attachments'] == null
? null
: (json['attachments'] as List<dynamic>)
.map((e) => AttachmentRef.fromJson(e as Map<String, dynamic>))
.toList(),
expiresAt: json['expiresAt'] as String?,
breachedAt: json['breachedAt'] as String?,
passwordChangedAt: json['passwordChangedAt'] as String?,
createdAt: json['createdAt'] as String,
createdBy: json['createdBy'] as String?,
updatedAt: json['updatedAt'] as String,
updatedBy: json['updatedBy'] as String?,
lastUsedAt: json['lastUsedAt'] as String?,
version: json['version'] as int,
principalDid: json['principalDid'] as String?,
ext: json['ext'] as Map<String, dynamic>?,
);