21 lines
684 B
Dart
21 lines
684 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
part 'news_dto.g.dart';
|
|
@JsonSerializable(createToJson: false)
|
|
class NewsDto{
|
|
@JsonKey(name: 'Главное')
|
|
final List<NewAttributesDataDto>? data;
|
|
const NewsDto({this.data});
|
|
factory NewsDto.fromJson(Map<String, dynamic> json) => _$NewsDtoFromJson(json);
|
|
}
|
|
|
|
|
|
@JsonSerializable(createToJson: false)
|
|
class NewAttributesDataDto{
|
|
final String? title;
|
|
final String? summary;
|
|
@JsonKey(name: 'image_link')
|
|
final String? imagelink;
|
|
|
|
const NewAttributesDataDto({this.title, this.summary, this.imagelink });
|
|
factory NewAttributesDataDto.fromJson(Map<String, dynamic> json) => _$NewAttributesDataDtoFromJson(json);
|
|
} |