class Community { final String uuid; final String name; final String description; Community({ required this.uuid, required this.name, this.description = '', }); factory Community.fromJson(Map json) { return Community( uuid: json['uuid'] ?? '', name: json['name'] ?? 'Unnamed Community', description: json['description'] ?? '', ); } Map toJson() { return { 'uuid': uuid, 'name': name, 'description': description, }; } }