Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
get_notifications_usecase.dart
Go to the documentation of this file.
1import 'package:dartz/dartz.dart';
2import 'package:equatable/equatable.dart';
3
4import '../../../../core/common/use_case/use_case.dart';
5import '../../../../core/error/failures.dart';
6import '../entities/notification_entity.dart';
7import '../repositories/notifications_repository.dart';
8
9class GetNotificationsParams extends Equatable {
10 final int userId;
11
13 required this.userId,
14 });
15
16 @override
17 List<Object?> get props => [userId];
18}
19
20class GetNotificationsUseCase implements UseCase<List<NotificationEntity>, GetNotificationsParams> {
22
23 GetNotificationsUseCase({required this.repository});
24
25 @override
26 Future<Either<Failure, List<NotificationEntity>>> call(GetNotificationsParams params) async {
27 return await repository.getNotifications(userId: params.userId);
28 }
29}
sealed class CheckInOutEvent extends Equatable userId
const GetNotificationsParams({ required this.userId, })
String get(String locale)
override Future< Either< Failure, List< VehicleEntity > > > call(GetAvailableVehiclesParams params) async
class GetCollectionContactListParams repository
GetNotificationsUseCase({required this.repository})
abstract class UseCase< Type, Params > props