Initial commit: unionflow-mobile-apps
Application Flutter complète (sans build artifacts). Signed-off-by: lions dev Team
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
/// Use Case: Récupérer la liste des organisations
|
||||
library get_organizations;
|
||||
|
||||
import 'package:injectable/injectable.dart';
|
||||
import '../../data/models/organization_model.dart';
|
||||
import '../repositories/organization_repository.dart';
|
||||
|
||||
/// Récupère la liste paginée des organisations
|
||||
@injectable
|
||||
class GetOrganizations {
|
||||
final IOrganizationRepository _repository;
|
||||
|
||||
GetOrganizations(this._repository);
|
||||
|
||||
/// Exécute le use case
|
||||
/// [page] : Numéro de page (défaut: 0)
|
||||
/// [size] : Taille de la page (défaut: 20)
|
||||
/// [recherche] : Terme de recherche optionnel
|
||||
/// Retourne une liste d'organisations
|
||||
Future<List<OrganizationModel>> call({
|
||||
int page = 0,
|
||||
int size = 20,
|
||||
String? recherche,
|
||||
}) async {
|
||||
return _repository.getOrganizations(
|
||||
page: page,
|
||||
size: size,
|
||||
recherche: recherche,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user