хз что я там добавил. но уже не важно

This commit is contained in:
antoc0der 2024-12-20 22:07:38 +04:00
parent 208f755ad6
commit 4211606248
10 changed files with 9 additions and 43 deletions

View File

@ -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);
// }

View File

@ -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(),
// );

View File

@ -55,3 +55,4 @@ class MyApp extends StatelessWidget {
);
}
}

View File

@ -31,4 +31,4 @@ class SvgUk extends StatelessWidget{
Widget build(BuildContext context){
return SvgPicture.asset(R.ASSETS_SVG_UK_SVG);
}
}
}

View File

@ -25,4 +25,4 @@ class LikeBloc extends Bloc<LikeEvent, LikeState> {
prefs.setStringList(_likedPrefsKey, updatedList);
emit(state.copyWith(likedIds: updatedList));
}
}
}

View File

@ -7,4 +7,4 @@ class LoadLikesEvent extends LikeEvent {
class ChangeLikeEvent extends LikeEvent {
final String id;
const ChangeLikeEvent(this.id);
}
}

View File

@ -9,4 +9,4 @@ class LikeState extends Equatable {
const LikeState({required this.likedIds});
@override
List<Object?> get props => [likedIds];
}
}

View File

@ -14,4 +14,4 @@ class LocaleBloc extends Bloc<LocaleEvent, LocaleState> {
.firstWhere((e) => e.languageCode != state.currentLocale.languageCode);
emit(state.copyWith(currentLocale: toChange));
}
}
}

View File

@ -3,4 +3,4 @@ abstract class LocaleEvent {
}
class ChangeLocaleEvent extends LocaleEvent {
const ChangeLocaleEvent();
}
}

View File

@ -8,4 +8,4 @@ class LocaleState extends Equatable {
const LocaleState({required this.currentLocale});
@override
List<Object?> get props => [currentLocale];
}
}