// Models of Conferences for MarkDown Text import 'dart:ffi'; class ConferencesModel { final int id; final String title; final DateTime date; int activity; int duration; String place; String city; String state; String country; // List type; String thumb; // List translations; ConferencesModel({ required this.id, required this.title, required this.date, this.activity = 0, this.duration = 0, this.place = '', this.city = '', this.state = '', this.country = '', // this.type = const [], this.thumb = '', // this.translations = const [], }); Map toJson() { return { 'id': id, 'title': title, 'date': date.toIso8601String(), 'activity': activity, 'duration': duration, 'place': place, 'city': city, 'state': state, 'country': country, // 'type': type, 'thumb': thumb.toString(), // 'translations': translations, }; } factory ConferencesModel.fromJson(Map json) { return ConferencesModel( id: json['id'], title: json['title'], date: DateTime.parse(json['date'] as String), activity: json['activity'] ?? 0, duration: json['duration'] ?? 0, place: json['place'] ?? '', city: json['city'] ?? '', state: json['state'] ?? '', country: json['country'] ?? '', // type: List.from(json['type'] ?? []), thumb: json['thumb'] ?? '', // translations: List.from(json['translations'] ?? []), ); } }