import 'package:json_annotation/json_annotation.dart'; part 'artists_dto.g.dart'; // dart run build_runner build --delete-conflicting-outputs @JsonSerializable(createToJson: false) class ArtistsDto { final List? data; final MetaDto? meta; const ArtistsDto({this.data, this.meta}); factory ArtistsDto.fromJson(Map json) => _$ArtistsDtoFromJson(json); } @JsonSerializable(createToJson: false) class MetaDto { final PaginationDto? pagination; const MetaDto({this.pagination}); factory MetaDto.fromJson(Map json) => _$MetaDtoFromJson(json); } @JsonSerializable(createToJson: false) class PaginationDto { final int? current; final int? next; final int? last; const PaginationDto({this.current, this.last, this.next}); factory PaginationDto.fromJson(Map json) => _$PaginationDtoFromJson(json); } @JsonSerializable(createToJson: false) class ArtistDataDto { final String? id; final String? name; final String image; final int year_streams; const ArtistDataDto(this.id, this.name, this.image, this.year_streams); factory ArtistDataDto.fromJson(Map json) => _$ArtistDataDtoFromJson(json); }