SharedUser.fromJson constructor
Creates a SharedUser object from a JSON map.
Implementation
factory SharedUser.fromJson(Map<String, dynamic> json) {
return SharedUser(
userId: json['user_id'],
firstName: json['first_name'],
lastName: json['last_name'],
username: json['username'],
photo: json['photo'] != null
? (json['photo'] as List<dynamic>)
.map((e) => PhotoSize.fromJson(e))
.toList()
: null,
);
}