import 'package:json_annotation/json_annotation.dart'; part 'coins_dto.g.dart'; @JsonSerializable(createToJson: false) class CoinsDto { final List? coins; CoinsDto({this.coins}); factory CoinsDto.fromJson(Map json) => _$CoinsDtoFromJson(json); } @JsonSerializable(createToJson: false) class CoinDataDto { final String? id; final String? name; final String? image; final double? currentPrice; final double? priceChange24h; CoinDataDto({ this.id, this.name, this.image, this.currentPrice, this.priceChange24h, }); factory CoinDataDto.fromJson(Map json) => _$CoinDataDtoFromJson(json); }