mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-23 09:16:19 +01:00
15 lines
407 B
Dart
15 lines
407 B
Dart
|
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;
|
||
|
}
|