Loading lib/data/entities/postcard_entity.dart +2 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ class PostcardEntity { final String text; final String senderId; final String? receiverId; final String timestamp; const PostcardEntity({ required this.id, Loading @@ -22,6 +23,7 @@ class PostcardEntity { required this.text, required this.senderId, this.receiverId, required this.timestamp }); factory PostcardEntity.fromJson(Map<String, dynamic> json) => _$PostcardEntityFromJson(json); Loading lib/data/entities/postcard_entity.g.dart +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ PostcardEntity _$PostcardEntityFromJson(Map<String, dynamic> json) => text: json['text'] as String, senderId: json['senderId'] as String, receiverId: json['receiverId'] as String?, timestamp: json['timestamp'] as String, ); Map<String, dynamic> _$PostcardEntityToJson(PostcardEntity instance) => Loading @@ -28,4 +29,5 @@ Map<String, dynamic> _$PostcardEntityToJson(PostcardEntity instance) => 'text': instance.text, 'senderId': instance.senderId, 'receiverId': instance.receiverId, 'timestamp': instance.timestamp, }; lib/data/models/postcard.dart +2 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ class Postcard { final String text; final User sender; final User? receiver; final DateTime timestamp; const Postcard({ required this.id, Loading @@ -19,5 +20,6 @@ class Postcard { required this.text, required this.sender, this.receiver, required this.timestamp, }); } lib/pages/collections/postcard_tile.dart +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ class PostcardTile extends StatelessWidget { userName: 'userName', profilePicture: 'profilePicture', lastLocation: 'lastLocation', isAdmin: true), isAdmin: true), timestamp: DateTime.parse('2023-07-20 20:18:04Z'), ); // create a new instance of Postcard return PostcardTile( postcard: postcard, Loading lib/service/postcard_service.dart +10 −8 Original line number Diff line number Diff line Loading @@ -46,7 +46,9 @@ class PostcardService { destinationLocation: p.destinationLocation, text: p.text, sender: sender, receiver: receiver); receiver: receiver, timestamp: DateTime.parse(p.timestamp), ); }).toList(), ); } Loading Loading
lib/data/entities/postcard_entity.dart +2 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ class PostcardEntity { final String text; final String senderId; final String? receiverId; final String timestamp; const PostcardEntity({ required this.id, Loading @@ -22,6 +23,7 @@ class PostcardEntity { required this.text, required this.senderId, this.receiverId, required this.timestamp }); factory PostcardEntity.fromJson(Map<String, dynamic> json) => _$PostcardEntityFromJson(json); Loading
lib/data/entities/postcard_entity.g.dart +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ PostcardEntity _$PostcardEntityFromJson(Map<String, dynamic> json) => text: json['text'] as String, senderId: json['senderId'] as String, receiverId: json['receiverId'] as String?, timestamp: json['timestamp'] as String, ); Map<String, dynamic> _$PostcardEntityToJson(PostcardEntity instance) => Loading @@ -28,4 +29,5 @@ Map<String, dynamic> _$PostcardEntityToJson(PostcardEntity instance) => 'text': instance.text, 'senderId': instance.senderId, 'receiverId': instance.receiverId, 'timestamp': instance.timestamp, };
lib/data/models/postcard.dart +2 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ class Postcard { final String text; final User sender; final User? receiver; final DateTime timestamp; const Postcard({ required this.id, Loading @@ -19,5 +20,6 @@ class Postcard { required this.text, required this.sender, this.receiver, required this.timestamp, }); }
lib/pages/collections/postcard_tile.dart +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ class PostcardTile extends StatelessWidget { userName: 'userName', profilePicture: 'profilePicture', lastLocation: 'lastLocation', isAdmin: true), isAdmin: true), timestamp: DateTime.parse('2023-07-20 20:18:04Z'), ); // create a new instance of Postcard return PostcardTile( postcard: postcard, Loading
lib/service/postcard_service.dart +10 −8 Original line number Diff line number Diff line Loading @@ -46,7 +46,9 @@ class PostcardService { destinationLocation: p.destinationLocation, text: p.text, sender: sender, receiver: receiver); receiver: receiver, timestamp: DateTime.parse(p.timestamp), ); }).toList(), ); } Loading