网络文章-v3 -下拉与加载更多
This commit is contained in:
@@ -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(() {});
|
||||
|
||||
Reference in New Issue
Block a user