PIbd-32_Shabunov_O.A._Mobil.../lib/data/dtos/coins_dto.dart
olshab a676d454ca implemented mock crypto repository
changed Cupertino search bar to Material UI 3
changed baseline color and card colors
implemented fetching crypto data from public API (untested)
2024-12-15 23:23:00 +04:00

32 lines
681 B
Dart

import 'package:json_annotation/json_annotation.dart';
part 'coins_dto.g.dart';
@JsonSerializable(createToJson: false)
class CoinsDto {
final List<CoinDataDto>? coins;
CoinsDto({this.coins});
factory CoinsDto.fromJson(Map<String, dynamic> 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<String, dynamic> json) => _$CoinDataDtoFromJson(json);
}