nc-photos/lib/use_case/list_share.dart

17 lines
484 B
Dart
Raw Normal View History

2021-08-08 04:34:44 +08:00
import 'package:nc_photos/account.dart';
import 'package:nc_photos/di_container.dart';
2021-08-08 04:34:44 +08:00
import 'package:nc_photos/entity/file.dart';
import 'package:nc_photos/entity/share.dart';
/// List all shares from a given file
class ListShare {
ListShare(this._c) : assert(require(_c));
static bool require(DiContainer c) => DiContainer.has(c, DiType.shareRepo);
2021-08-08 04:34:44 +08:00
Future<List<Share>> call(Account account, File file) =>
_c.shareRepo.list(account, file);
2021-08-08 04:34:44 +08:00
final DiContainer _c;
2021-08-08 04:34:44 +08:00
}