add dropdown
This commit is contained in:
17
lib/features/users/domain/usecases/sync_users_usecase.dart
Normal file
17
lib/features/users/domain/usecases/sync_users_usecase.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'package:dartz/dartz.dart';
|
||||
|
||||
import '../../../../core/errors/failures.dart';
|
||||
import '../entities/user_entity.dart';
|
||||
import '../repositories/users_repository.dart';
|
||||
|
||||
/// Use case for syncing users from API
|
||||
/// Forces refresh from API and saves to local storage
|
||||
class SyncUsersUseCase {
|
||||
final UsersRepository repository;
|
||||
|
||||
SyncUsersUseCase(this.repository);
|
||||
|
||||
Future<Either<Failure, List<UserEntity>>> call() async {
|
||||
return await repository.syncUsers();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user