class User { final int id; final String fullName; final String? photo; const User({required this.id, required this.fullName, required this.photo}); factory User.fromJson(Map json) => User( id: json['id'], fullName: json['fullName'], photo: json['photo'], ); Map toJson() => { 'id': id, 'fullName': fullName, 'photo': photo, }; }