import 'package:json_annotation/json_annotation.dart'; part 'currency_pair.g.dart'; @JsonSerializable() class CurrencyPairDTO { final String base; final String quote; const CurrencyPairDTO({ required this.base, required this.quote, }); factory CurrencyPairDTO.fromJson(Map json) => _$CurrencyPairDTOFromJson(json); Map toJson() => _$CurrencyPairDTOToJson(this); }