import 'package:domain/generated/json/base/json_field.dart'; import 'package:domain/generated/json/home_list_entity.g.dart'; import 'dart:convert'; export 'package:domain/generated/json/home_list_entity.g.dart'; @JsonSerializable() class HomeListEntity { List banners = []; @JSONField(name: "latest_transactions") List latestTransactions = []; @JSONField(name: "property_news") List propertyNews = []; @JSONField(name: "strata_management_guides") List strataManagementGuides = []; HomeListEntity(); factory HomeListEntity.fromJson(Map json) => $HomeListEntityFromJson(json); Map toJson() => $HomeListEntityToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class HomeListBanners { String? id; String? name; String? image; HomeListBanners(); factory HomeListBanners.fromJson(Map json) => $HomeListBannersFromJson(json); Map toJson() => $HomeListBannersToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class HomeListLatestTransactions { String? id; int type = 0; String? title; String? price; @JSONField(name: "created_at") String? createdAt; HomeListLatestTransactions(); factory HomeListLatestTransactions.fromJson(Map json) => $HomeListLatestTransactionsFromJson(json); Map toJson() => $HomeListLatestTransactionsToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class HomeListPropertyNews { String? id; String? title; @JSONField(name: "cover_image") String? coverImage; @JSONField(name: "created_at") String? createdAt; HomeListPropertyNews(); factory HomeListPropertyNews.fromJson(Map json) => $HomeListPropertyNewsFromJson(json); Map toJson() => $HomeListPropertyNewsToJson(this); @override String toString() { return jsonEncode(this); } }