Credential.fromJson constructor

Credential.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Credential.fromJson(Map<String, dynamic> json) {
  return Credential(
    id: json['id'] ?? '',
    name: json['name'] ?? '',
    type: json['type'] ?? '',
    data: json['data'] != null ? Map<String, dynamic>.from(json['data']) : null,
    createdAt: json['createdAt'] != null ? DateTime.parse(json['createdAt']) : null,
    updatedAt: json['updatedAt'] != null ? DateTime.parse(json['updatedAt']) : null,
  );
}