хз что я там добавил. но уже не важно
This commit is contained in:
parent
208f755ad6
commit
4211606248
@ -6,11 +6,9 @@ part 'news_dto.g.dart';
|
||||
class NewsDto {
|
||||
@JsonKey(name: 'articles')
|
||||
final List<NewAttributesDataDto>? data;
|
||||
// final MetaDto? meta;
|
||||
|
||||
const NewsDto({
|
||||
this.data,
|
||||
// this.meta,
|
||||
});
|
||||
|
||||
factory NewsDto.fromJson(Map<String, dynamic> json) =>
|
||||
@ -39,25 +37,4 @@ class NewAttributesDataDto {
|
||||
factory NewAttributesDataDto.fromJson(Map<String, dynamic> json) =>
|
||||
_$NewAttributesDataDtoFromJson(json);
|
||||
}
|
||||
//
|
||||
// @JsonSerializable(createToJson: false)
|
||||
// class MetaDto {
|
||||
// final PaginationDto? pagination;
|
||||
//
|
||||
// const MetaDto({this.pagination});
|
||||
//
|
||||
// factory MetaDto.fromJson(Map<String, dynamic> json) =>
|
||||
// _$MetaDtoFromJson(json);
|
||||
// }
|
||||
//
|
||||
// @JsonSerializable(createToJson: false)
|
||||
// class PaginationDto {
|
||||
// final int? current;
|
||||
// final int? next;
|
||||
// final int? last;
|
||||
//
|
||||
// const PaginationDto({this.current, this.next, this.last});
|
||||
//
|
||||
// factory PaginationDto.fromJson(Map<String, dynamic> json) =>
|
||||
// _$PaginationDtoFromJson(json);
|
||||
// }
|
||||
|
||||
|
@ -25,15 +25,3 @@ NewAttributesDataDto _$NewAttributesDataDtoFromJson(
|
||||
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(),
|
||||
// );
|
||||
|
@ -55,3 +55,4 @@ class MyApp extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,4 +31,4 @@ class SvgUk extends StatelessWidget{
|
||||
Widget build(BuildContext context){
|
||||
return SvgPicture.asset(R.ASSETS_SVG_UK_SVG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,4 +25,4 @@ class LikeBloc extends Bloc<LikeEvent, LikeState> {
|
||||
prefs.setStringList(_likedPrefsKey, updatedList);
|
||||
emit(state.copyWith(likedIds: updatedList));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,4 +7,4 @@ class LoadLikesEvent extends LikeEvent {
|
||||
class ChangeLikeEvent extends LikeEvent {
|
||||
final String id;
|
||||
const ChangeLikeEvent(this.id);
|
||||
}
|
||||
}
|
||||
|
@ -9,4 +9,4 @@ class LikeState extends Equatable {
|
||||
const LikeState({required this.likedIds});
|
||||
@override
|
||||
List<Object?> get props => [likedIds];
|
||||
}
|
||||
}
|
||||
|
@ -14,4 +14,4 @@ class LocaleBloc extends Bloc<LocaleEvent, LocaleState> {
|
||||
.firstWhere((e) => e.languageCode != state.currentLocale.languageCode);
|
||||
emit(state.copyWith(currentLocale: toChange));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ abstract class LocaleEvent {
|
||||
}
|
||||
class ChangeLocaleEvent extends LocaleEvent {
|
||||
const ChangeLocaleEvent();
|
||||
}
|
||||
}
|
||||
|
@ -8,4 +8,4 @@ class LocaleState extends Equatable {
|
||||
const LocaleState({required this.currentLocale});
|
||||
@override
|
||||
List<Object?> get props => [currentLocale];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user