mirror of
https://github.com/timokz/flutter-vienna-hackathon-25.git
synced 2025-11-08 18:44:20 +01:00
Update presentation
This commit is contained in:
parent
ac2b74bfcc
commit
3a0749b9a1
2 changed files with 0 additions and 34 deletions
Binary file not shown.
|
|
@ -1,34 +0,0 @@
|
||||||
class NewsEventModel {
|
|
||||||
final String content;
|
|
||||||
|
|
||||||
final DateTime timestamp;
|
|
||||||
|
|
||||||
final double latitude;
|
|
||||||
|
|
||||||
final double longitude;
|
|
||||||
|
|
||||||
NewsEventModel({
|
|
||||||
required this.content,
|
|
||||||
required this.timestamp,
|
|
||||||
required this.latitude,
|
|
||||||
required this.longitude,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Convert NewsData to a Map
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return {
|
|
||||||
'content': content,
|
|
||||||
'timestamp': timestamp.toIso8601String(),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create NewsData from a Map
|
|
||||||
factory NewsEventModel.fromJson(Map<String, dynamic> json) {
|
|
||||||
return NewsEventModel(
|
|
||||||
content: json['content'] as String,
|
|
||||||
timestamp: DateTime.parse(json['timestamp'] as String),
|
|
||||||
latitude: json['latitude'] as double,
|
|
||||||
longitude: json['longitude'] as double,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Reference in a new issue