add auth, format
This commit is contained in:
@@ -21,7 +21,9 @@ class NotificationRepositoryImpl implements NotificationRepository {
|
||||
Future<List<Notification>> getAllNotifications() async {
|
||||
final jsonList = await localDataSource.getAllNotifications();
|
||||
return jsonList.map((json) => NotificationModel.fromJson(json)).toList()
|
||||
..sort((a, b) => b.createdAt.compareTo(a.createdAt)); // Sort by newest first
|
||||
..sort(
|
||||
(a, b) => b.createdAt.compareTo(a.createdAt),
|
||||
); // Sort by newest first
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user