nc-photos/app/lib/use_case/list_person.dart

15 lines
407 B
Dart
Raw Normal View History

2022-08-05 10:26:29 +02:00
import 'package:nc_photos/account.dart';
import 'package:nc_photos/di_container.dart';
import 'package:nc_photos/entity/person.dart';
class ListPerson {
ListPerson(this._c) : assert(require(_c));
static bool require(DiContainer c) => DiContainer.has(c, DiType.personRepo);
/// List all persons
Future<List<Person>> call(Account account) => _c.personRepo.list(account);
final DiContainer _c;
}