class DynamicResponse { final List content; final int currentPage; final int totalElements; final int totalPages; DynamicResponse({ required this.content, required this.currentPage, required this.totalElements, required this.totalPages, }); factory DynamicResponse.fromJson(Map json) { return DynamicResponse( content: json['content'], currentPage: json['currentPage'], totalElements: json['totalElements'], totalPages: json['totalPages'], ); } Map toJson() { return { 'content': content, 'currentPage': currentPage, 'totalElements': totalElements, 'totalPages': totalPages, }; } }