Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
notifications_remote_datasource.dart
Go to the documentation of this file.
1import '../../../../core/api/api_client.dart';
2import '../../../../core/api/api_endpoints.dart';
3import '../../../../core/services/service_locator.dart';
4import '../models/notification_model.dart';
5
8
9 Future<List<NotificationModel>> getNotifications({required int userId}) async {
10 final response = await apiClient.get(
11 path: ApiEndpoints.getNotifications(
12 userId: userId.toString(),
13 ),
14 );
15 if (response is List) {
16 return response.map(
17 (json) => NotificationModel.fromJson(json),
18 ).toList();
19 }
20 return [];
21 }
22}
sealed class CheckInOutEvent extends Equatable userId
Future< List< NotificationModel > > getNotifications({required int userId}) async
final String path
final sl