网络文章-v3 -下拉与加载更多
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.toly1994.flutter_first_station">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<application
|
||||
android:label="flutter_first_station"
|
||||
android:name="${applicationName}"
|
||||
|
||||
@@ -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