fix new version applocalization
This commit is contained in:
54
covas_mobile_old/lib/classes/events.dart
Normal file
54
covas_mobile_old/lib/classes/events.dart
Normal file
@@ -0,0 +1,54 @@
|
||||
class Events {
|
||||
String? id;
|
||||
String? name;
|
||||
String? place;
|
||||
String? startDate;
|
||||
String? endDate;
|
||||
String? description;
|
||||
String? link;
|
||||
String? ticket;
|
||||
double? latitude;
|
||||
double? longitude;
|
||||
List<String>? tags;
|
||||
List<String>? organizers;
|
||||
String? imgUrl;
|
||||
int? interestedCount;
|
||||
bool? interested;
|
||||
Events(
|
||||
{this.place,
|
||||
this.id,
|
||||
this.name,
|
||||
this.startDate,
|
||||
this.description,
|
||||
this.endDate,
|
||||
this.tags,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.organizers,
|
||||
this.link,
|
||||
this.ticket,
|
||||
this.imgUrl,
|
||||
this.interestedCount,
|
||||
this.interested});
|
||||
|
||||
Events.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'] as String?;
|
||||
name = json['name'] as String?;
|
||||
place = json['place'] as String?;
|
||||
startDate = json['start_date'] as String?;
|
||||
endDate = json['end_date'] as String?;
|
||||
description = json['description'] as String?;
|
||||
latitude = (json['latitude'] as num?)?.toDouble(); // Safely cast to double
|
||||
longitude =
|
||||
(json['longitude'] as num?)?.toDouble(); // Safely cast to double
|
||||
tags = (json['tags'] as List<dynamic>?)
|
||||
?.cast<String>(); // Convert List<dynamic> to List<String>
|
||||
organizers = (json['organizers'] as List<dynamic>?)
|
||||
?.cast<String>(); // Convert List<dynamic> to List<String>
|
||||
imgUrl = json['imgUrl'] as String?;
|
||||
link = json['link'] as String?;
|
||||
ticket = json['ticket'] as String?;
|
||||
interested = json['interested'] as bool?;
|
||||
interestedCount = json['interested_count'] as int?;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user