import 'package:json_annotation/json_annotation.dart'; part 'user_dto.g.dart'; @JsonSerializable(createToJson: false) class UsersDto { final List? items; final int? count; final int? limit; final int? countAll; final int? pagesCount; final int? pageNumber; final bool? hasPrevPage; final bool? hasNextPage; const UsersDto( {this.items, this.count, this.limit, this.countAll, this.pagesCount, this.pageNumber, this.hasPrevPage, this.hasNextPage}); factory UsersDto.fromJson(Map json) => _$UsersDtoFromJson(json); } @JsonSerializable(createToJson: false) class UserDto { final UserDataDto? model; final int? age; final double? distance; const UserDto({this.model, this.age, this.distance}); factory UserDto.fromJson(Map json) => _$UserDtoFromJson(json); } @JsonSerializable(createToJson: false) class LocationDto { final double? lat; final double? lon; const LocationDto({this.lat, this.lon}); factory LocationDto.fromJson(Map json) => _$LocationDtoFromJson(json); } @JsonSerializable(createToJson: false) class UserDataDto { final int? id; final String? name; final String? surname; final String? description; final String? image; final String? gender; final String? dateOfBirth; final LocationDto? location; const UserDataDto( {this.id, this.name, this.surname, this.description, this.image, this.gender, this.dateOfBirth, this.location}); factory UserDataDto.fromJson(Map json) => _$UserDataDtoFromJson(json); }