class SwotItem { final int id; final String title; final String description; final String category; final String type; final String imageUrl; final double x1; final double y1; final String createdAt; SwotItem({ required this.id, required this.title, required this.description, required this.category, required this.type, required this.imageUrl, required this.x1, required this.y1, required this.createdAt, }); factory SwotItem.fromJson(Map json) { return SwotItem( id: json['id'], title: json['title'], description: json['description'], category: json['category'], type: json['type'], imageUrl: json["url"], x1: json["scoreX1"], y1: json["scoreY1"], createdAt: json["createdAt"] ); } }