import 'VideoCards.dart'; class VideoCardsManager { final List _videocards = []; void addVideoCards(VideoCards videocards) { _videocards.add(videocards); } List filterVideoCardsByCategory(VideoCardsCategory category) { return _videocards.where((videocards) => videocards.category == category).toList(); } double calculateTotalAmount() { return _videocards.fold(0.0, (sum,videocards) => sum + videocards.price); } Future clearVideoCards() async { await Future.delayed(Duration(seconds: 3)); _videocards.clear(); print('Список чист!'); } }