class MainPageResultType { final int id; final String title; final String image; final String link; final String createdAt; final String type; MainPageResultType({ required this.id, required this.title, required this.image, required this.link, required this.createdAt, required this.type, }); factory MainPageResultType.fromJson(Map json) => MainPageResultType( id: json['id'], title: json['title'], image: json['image'] ?? 'https://wallpapercave.com/fwp/wp12977378.jpg', link: json['link'], createdAt: json['createdAt'], type: json['type'], ); }