import 'dart:convert'; LiveStreamsResponseModel liveStreamsResponseModelFromJson(String str) => LiveStreamsResponseModel.fromJson(json.decode(str)); String liveStreamsResponseModelToJson(LiveStreamsResponseModel data) => json.encode(data.toJson()); class LiveStreamsResponseModel { bool? isSuccess; int? statusCode; String? message; Data? data; dynamic errors; LiveStreamsResponseModel({ this.isSuccess, this.statusCode, this.message, this.data, this.errors, }); factory LiveStreamsResponseModel.fromJson(Map json) => LiveStreamsResponseModel( isSuccess: json["isSuccess"], statusCode: json["statusCode"], message: json["message"], data: json["data"] == null ? null : Data.fromJson(json["data"]), errors: json["errors"], ); Map toJson() => { "isSuccess": isSuccess, "statusCode": statusCode, "message": message, "data": data?.toJson(), "errors": errors, }; } class Data { int? totalCount; List? items; Data({this.totalCount, this.items}); factory Data.fromJson(Map json) => Data( totalCount: json["totalCount"], items: json["items"] == null ? [] : List.from( json["items"]!.map((x) => SingelStreamModel.fromJson(x)), ), ); Map toJson() => { "totalCount": totalCount, "items": items == null ? [] : List.from(items!.map((x) => x.toJson())), }; } class SingelStreamModel { String? userId; String? firstName; String? lastName; String? fullName; String? profilePicture; int? streamId; String? streamTitle; String? streamDescription; String? streamChatRoomId; bool? isLive; // New fields String? tribeName; bool? isTribe; int? tribeId; SingelStreamModel({ this.userId, this.firstName, this.lastName, this.fullName, this.profilePicture, this.streamId, this.streamTitle, this.streamDescription, this.streamChatRoomId, this.isLive, this.tribeName, this.isTribe, this.tribeId, }); factory SingelStreamModel.fromJson(Map json) => SingelStreamModel( userId: json["userID"], firstName: json["firstName"], lastName: json["lastName"], fullName: json["fullName"], profilePicture: json["profilePicture"], streamId: json["streamID"], streamTitle: json["streamTitle"], streamDescription: json["streamDescription"], streamChatRoomId: json["streamChatRoomId"], isLive: json["isLive"], // New fields tribeName: json["tribeName"], isTribe: json["isTribe"], tribeId: json["tribeID"], ); Map toJson() => { "userID": userId, "firstName": firstName, "lastName": lastName, "fullName": fullName, "profilePicture": profilePicture, "streamID": streamId, "streamTitle": streamTitle, "streamDescription": streamDescription, "streamChatRoomId": streamChatRoomId, "isLive": isLive, // New fields "tribeName": tribeName, "isTribe": isTribe, "tribeID": tribeId, }; }