Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-App
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
reason
2022-01-02 23:12:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
79d5f90d67e3bde938abe5d717acb687326161e3
79d5f90d
1 parent
af02f8a0
clear
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
lib/category/page/category_list_page.dart
lib/category/provider/categories_page_provider.dart
lib/category/page/category_list_page.dart
View file @
79d5f90
...
...
@@ -55,7 +55,7 @@ class _CategoryListPageState extends State<CategoryListPage> {
icon:
_imgList
[
i
%
6
],
title:
'八月十五中秋月饼礼盒'
,
type:
i
%
3
),
);
});
_set
Good
sCount
(
_list
.
length
);
_set
Categorie
sCount
(
_list
.
length
);
});
}
...
...
@@ -71,13 +71,13 @@ class _CategoryListPageState extends State<CategoryListPage> {
);
_page
++;
});
_set
Good
sCount
(
_list
.
length
);
_set
Categorie
sCount
(
_list
.
length
);
});
}
void
_set
Good
sCount
(
int
count
)
{
void
_set
Categorie
sCount
(
int
count
)
{
/// 与上方等价,provider 4.1.0添加的拓展方法
context
.
read
<
CategoriesPageProvider
>().
set
Good
sCount
(
count
);
context
.
read
<
CategoriesPageProvider
>().
set
Categorie
sCount
(
count
);
}
int
_page
=
1
;
...
...
lib/category/provider/categories_page_provider.dart
View file @
79d5f90
...
...
@@ -23,7 +23,7 @@ class CategoriesPageProvider extends ChangeNotifier {
notifyListeners
();
}
void
set
Good
sCount
(
int
count
)
{
void
set
Categorie
sCount
(
int
count
)
{
_goodsCountList
[
index
]
=
count
;
notifyListeners
();
}
...
...
Please
register
or
login
to post a comment