SpaceProperty.fromJson constructor

SpaceProperty.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory SpaceProperty.fromJson(Map<String, Object?> json) {
  return SpaceProperty(
    id: json[r'id'] as String?,
    key: json[r'key'] as String?,
    value: json[r'value'],
    createdAt: DateTime.tryParse(json[r'createdAt'] as String? ?? ''),
    createdBy: json[r'createdBy'] as String?,
    version: json[r'version'] != null
        ? SpacePropertyVersion.fromJson(
            json[r'version']! as Map<String, Object?>)
        : null,
  );
}