Showing
2 changed files
with
5 additions
and
5 deletions
... | @@ -55,7 +55,7 @@ class _CategoryListPageState extends State<CategoryListPage> { | ... | @@ -55,7 +55,7 @@ class _CategoryListPageState extends State<CategoryListPage> { |
55 | icon: _imgList[i % 6], title: '八月十五中秋月饼礼盒', type: i % 3), | 55 | icon: _imgList[i % 6], title: '八月十五中秋月饼礼盒', type: i % 3), |
56 | ); | 56 | ); |
57 | }); | 57 | }); |
58 | - _setGoodsCount(_list.length); | 58 | + _setCategoriesCount(_list.length); |
59 | }); | 59 | }); |
60 | } | 60 | } |
61 | 61 | ||
... | @@ -71,13 +71,13 @@ class _CategoryListPageState extends State<CategoryListPage> { | ... | @@ -71,13 +71,13 @@ class _CategoryListPageState extends State<CategoryListPage> { |
71 | ); | 71 | ); |
72 | _page++; | 72 | _page++; |
73 | }); | 73 | }); |
74 | - _setGoodsCount(_list.length); | 74 | + _setCategoriesCount(_list.length); |
75 | }); | 75 | }); |
76 | } | 76 | } |
77 | 77 | ||
78 | - void _setGoodsCount(int count) { | 78 | + void _setCategoriesCount(int count) { |
79 | /// 与上方等价,provider 4.1.0添加的拓展方法 | 79 | /// 与上方等价,provider 4.1.0添加的拓展方法 |
80 | - context.read<CategoriesPageProvider>().setGoodsCount(count); | 80 | + context.read<CategoriesPageProvider>().setCategoriesCount(count); |
81 | } | 81 | } |
82 | 82 | ||
83 | int _page = 1; | 83 | int _page = 1; | ... | ... |
... | @@ -23,7 +23,7 @@ class CategoriesPageProvider extends ChangeNotifier { | ... | @@ -23,7 +23,7 @@ class CategoriesPageProvider extends ChangeNotifier { |
23 | notifyListeners(); | 23 | notifyListeners(); |
24 | } | 24 | } |
25 | 25 | ||
26 | - void setGoodsCount(int count) { | 26 | + void setCategoriesCount(int count) { |
27 | _goodsCountList[index] = count; | 27 | _goodsCountList[index] = count; |
28 | notifyListeners(); | 28 | notifyListeners(); |
29 | } | 29 | } | ... | ... |
-
Please register or login to post a comment