Line data Source code
1 : import 'package:app_pym/core/usecases/usecase.dart';
2 : import 'package:app_pym/domain/entities/authentication/app_user.dart';
3 : import 'package:app_pym/domain/repositories/authentication/app_user_repository.dart';
4 : import 'package:injectable/injectable.dart';
5 :
6 : @prod
7 : @lazySingleton
8 : class GetAppUser extends Usecase<Future<AppUser>, NoParams> {
9 : final AppUserRepository repository;
10 :
11 0 : const GetAppUser(this.repository);
12 :
13 0 : @override
14 : Future<AppUser> call(NoParams noParams) {
15 0 : return repository.fetch();
16 : }
17 : }
|