import 'package:flutter/foundation.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:nc_photos/entity/collection_item/util.dart'; import 'package:nc_photos/entity/file_descriptor.dart'; import 'package:np_common/type.dart'; /// A read-only collection that does not support modifying its items mixin CollectionReadOnlyAdapter implements CollectionAdapter { @override Future addFiles( List files, { ErrorWithValueHandler? onError, required ValueChanged onCollectionUpdated, }) { throw UnsupportedError("Operation not supported"); } @override Future edit({ String? name, List? items, CollectionItemSort? itemSort, }) { throw UnsupportedError("Operation not supported"); } @override Future removeItems( List items, { ErrorWithValueIndexedHandler? onError, required ValueChanged onCollectionUpdated, }) { throw UnsupportedError("Operation not supported"); } @override bool isItemsRemovable(List items) { return false; } }