class Comment { Comment({ this.idRep, this.sender, this.username, this.textRep, this.fotoProfile, this.createAt, }); String? idRep; String? sender; String? username; String? textRep; String? fotoProfile; String? createAt; factory Comment.fromJson(Map json) => Comment( idRep: json["id_rep"], sender: json["sender"], username: json["username"], textRep: json["text_rep"], fotoProfile: json["foto_profile"], createAt: json["create_at"], ); Map toJson() => { "id_rep": idRep, "sender": sender, "username": username, "text_rep": textRep, "foto_profile": fotoProfile, "create_at": createAt, }; } class LikeModels { LikeModels({ this.userId, }); bool? userId; factory LikeModels.fromJson(Map json) => LikeModels( userId: json["user_id"].length > 0, ); Map toJson() => { "id_rep": userId, }; }