网络文章-v3 -下拉与加载更多

This commit is contained in:
toly
2023-05-20 07:51:54 +08:00
parent ea86391cfc
commit 2f025c5a2e
2 changed files with 2 additions and 1 deletions

View File

@@ -76,7 +76,7 @@ class _ArticleContentState extends State<ArticleContent> {
}
void _onLoad() async{
int nextPage = _articles.length%20;
int nextPage = _articles.length ~/ 20;
List<Article> newArticles = await api.loadArticles(nextPage);
_articles = _articles + newArticles;
setState(() {});