40 lines
1.4 KiB
Dart
40 lines
1.4 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'news_dto.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
NewsDto _$NewsDtoFromJson(Map<String, dynamic> json) => NewsDto(
|
|
data: (json['articles'] as List<dynamic>?)
|
|
?.map((e) => NewAttributesDataDto.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
// meta: json['meta'] == null
|
|
// ? null
|
|
// : MetaDto.fromJson(json['meta'] as Map<String, dynamic>),
|
|
);
|
|
|
|
NewAttributesDataDto _$NewAttributesDataDtoFromJson(
|
|
Map<String, dynamic> json) =>
|
|
NewAttributesDataDto(
|
|
id: json['url'] as String?,
|
|
title: json['title'] as String?,
|
|
description: json['description'] as String?,
|
|
imagelink: json['urlToImage'] as String?,
|
|
date: json['publishedAt'] as String,
|
|
);
|
|
|
|
// MetaDto _$MetaDtoFromJson(Map<String, dynamic> json) => MetaDto(
|
|
// pagination: json['pagination'] == null
|
|
// ? null
|
|
// : PaginationDto.fromJson(json['pagination'] as Map<String, dynamic>),
|
|
// );
|
|
//
|
|
// PaginationDto _$PaginationDtoFromJson(Map<String, dynamic> json) =>
|
|
// PaginationDto(
|
|
// current: (json['current'] as num?)?.toInt(),
|
|
// next: (json['next'] as num?)?.toInt(),
|
|
// last: (json['last'] as num?)?.toInt(),
|
|
// );
|