mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-23 01:06:21 +01:00
27 lines
823 B
Dart
27 lines
823 B
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:nc_photos/account.dart';
|
|
import 'package:nc_photos/di_container.dart';
|
|
import 'package:nc_photos/entity/collection.dart';
|
|
import 'package:nc_photos/entity/collection/adapter.dart';
|
|
import 'package:nc_photos/entity/collection_item.dart';
|
|
import 'package:np_common/type.dart';
|
|
|
|
class RemoveFromCollection {
|
|
const RemoveFromCollection(this._c);
|
|
|
|
Future<int> call(
|
|
Account account,
|
|
Collection collection,
|
|
List<CollectionItem> items, {
|
|
ErrorWithValueIndexedHandler<CollectionItem>? onError,
|
|
required ValueChanged<Collection> onCollectionUpdated,
|
|
}) {
|
|
return CollectionAdapter.of(_c, account, collection).removeItems(
|
|
items,
|
|
onError: onError,
|
|
onCollectionUpdated: onCollectionUpdated,
|
|
);
|
|
}
|
|
|
|
final DiContainer _c;
|
|
}
|