Space.fromJson constructor
Implementation
factory Space.fromJson(Map<String, Object?> json) {
return Space(
id: json[r'id'],
key: json[r'key'] as String?,
name: json[r'name'] as String?,
type: json[r'type'] as String?,
status: json[r'status'] as String?,
createdAt: DateTime.tryParse(json[r'createdAt'] as String? ?? ''),
homepageId: json[r'homepageId'],
description: json[r'description'] != null
? SpaceDescription.fromJson(
json[r'description']! as Map<String, Object?>)
: null,
icon: json[r'icon'] != null
? SpaceIcon.fromJson(json[r'icon']! as Map<String, Object?>)
: null,
);
}