getItemsByCategory static method

Future<List<ClothingItem>> getItemsByCategory(
  1. String category
)

按分类获取衣物

Implementation

static Future<List<ClothingItem>> getItemsByCategory(String category) async {
  final items = await getAllClothingItems();
  return items.where((item) => item.category == category).toList();
}