import 'package:freezed_annotation/freezed_annotation.dart'; part 'pagination.g.dart'; @JsonSerializable() class PaginationResult { int count; List? data; PaginationResult({ required this.count, this.data, }); factory PaginationResult.fromJson(Map json) => _$PaginationResultFromJson(json); Map toJson() => _$PaginationResultToJson(this); }