28 lines
744 B
Dart
28 lines
744 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'codeforcer_dto.g.dart';
|
|
|
|
@JsonSerializable(createToJson: false)
|
|
class CodeforcersDto {
|
|
@JsonKey(name: 'result')
|
|
final List<CodeforcerDto>? data;
|
|
|
|
const CodeforcersDto({this.data});
|
|
|
|
factory CodeforcersDto.fromJson(Map<String, dynamic> json) => _$CodeforcersDtoFromJson(json);
|
|
}
|
|
|
|
|
|
@JsonSerializable(createToJson: false)
|
|
class CodeforcerDto {
|
|
final String? handle;
|
|
final String? rank;
|
|
final String? maxRank;
|
|
final String? titlePhoto;
|
|
final int? rating;
|
|
|
|
const CodeforcerDto({this.handle, this.rank, this.titlePhoto, this.rating, this.maxRank});
|
|
|
|
factory CodeforcerDto.fromJson(Map<String, dynamic> json) => _$CodeforcerDtoFromJson(json);
|
|
}
|