reason

clear

......@@ -55,7 +55,7 @@ class _CategoryListPageState extends State<CategoryListPage> {
icon: _imgList[i % 6], title: '八月十五中秋月饼礼盒', type: i % 3),
);
});
_setGoodsCount(_list.length);
_setCategoriesCount(_list.length);
});
}
......@@ -71,13 +71,13 @@ class _CategoryListPageState extends State<CategoryListPage> {
);
_page++;
});
_setGoodsCount(_list.length);
_setCategoriesCount(_list.length);
});
}
void _setGoodsCount(int count) {
void _setCategoriesCount(int count) {
/// 与上方等价,provider 4.1.0添加的拓展方法
context.read<CategoriesPageProvider>().setGoodsCount(count);
context.read<CategoriesPageProvider>().setCategoriesCount(count);
}
int _page = 1;
......
......@@ -23,7 +23,7 @@ class CategoriesPageProvider extends ChangeNotifier {
notifyListeners();
}
void setGoodsCount(int count) {
void setCategoriesCount(int count) {
_goodsCountList[index] = count;
notifyListeners();
}
......