add auth, format

This commit is contained in:
Phuoc Nguyen
2025-11-07 11:52:06 +07:00
parent 24a8508fce
commit 3803bd26e0
173 changed files with 8505 additions and 7116 deletions

View File

@@ -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