SharedSpace.fromJson constructor
Deserializes json
into a Space Object
Implementation
factory SharedSpace.fromJson(Map<String, dynamic> json) {
return SharedSpace(
name: json['name'],
id: json['id'],
realSpace: Uri.parse(json['realSpace']),
links: linkMapFromJson(json['_links']),
embeddedGrids: (json['_embedded']?['grids'] as List?)
?.map((e) => Grid.fromJson(e))
.toList(),
key: json['key'],
category: json['belongsTo'],
color: json['color'] != null
? Color(
int.parse(json['color'].substring(1, 7), radix: 16) + 0xFF000000,
)
: null,
icon: json['icon'],
iconSet: json['iconset'],
);
}