class FeedRecord { String type; Map data; DateTime createdAt; FeedRecord({ required this.type, required this.data, required this.createdAt, }); factory FeedRecord.fromJson(Map json) => FeedRecord( type: json['type'], data: json['data'], createdAt: DateTime.parse(json['created_at']), ); Map toJson() => { 'type': type, 'data': data, 'created_at': createdAt.toIso8601String(), }; }