|
|
@ -10,8 +10,10 @@ import 'package:huixiang/retrofit/data/page.dart'; |
|
|
|
import 'package:huixiang/retrofit/retrofit_api.dart'; |
|
|
|
import 'package:huixiang/retrofit/retrofit_api.dart'; |
|
|
|
import 'package:huixiang/view_widget/classic_header.dart'; |
|
|
|
import 'package:huixiang/view_widget/classic_header.dart'; |
|
|
|
import 'package:huixiang/view_widget/my_footer.dart'; |
|
|
|
import 'package:huixiang/view_widget/my_footer.dart'; |
|
|
|
|
|
|
|
import 'package:huixiang/view_widget/no_data_view.dart'; |
|
|
|
import 'package:pull_to_refresh/pull_to_refresh.dart'; |
|
|
|
import 'package:pull_to_refresh/pull_to_refresh.dart'; |
|
|
|
import 'package:shared_preferences/shared_preferences.dart'; |
|
|
|
import 'package:shared_preferences/shared_preferences.dart'; |
|
|
|
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
|
|
|
|
|
|
|
|
class CommunityChildPage extends StatefulWidget { |
|
|
|
class CommunityChildPage extends StatefulWidget { |
|
|
|
final String typeStr; |
|
|
|
final String typeStr; |
|
|
@ -81,7 +83,7 @@ class _CommunityChildPage extends State<CommunityChildPage> with AutomaticKeepAl |
|
|
|
article.id = element.id; |
|
|
|
article.id = element.id; |
|
|
|
article.content = jsonEncode(element.subjectInfo); |
|
|
|
article.content = jsonEncode(element.subjectInfo); |
|
|
|
article.mainTitle =element.subject; |
|
|
|
article.mainTitle =element.subject; |
|
|
|
article.liked = element.selfFollow; |
|
|
|
article.isFollow = element.selfFollow; |
|
|
|
article.authorHeadImg = element.memberInfo?.avatar; |
|
|
|
article.authorHeadImg = element.memberInfo?.avatar; |
|
|
|
article.authorName = element.memberInfo?.nickname; |
|
|
|
article.authorName = element.memberInfo?.nickname; |
|
|
|
article.createTime = element.createTime; |
|
|
|
article.createTime = element.createTime; |
|
|
@ -121,7 +123,13 @@ class _CommunityChildPage extends State<CommunityChildPage> with AutomaticKeepAl |
|
|
|
isLoadMore = true; |
|
|
|
isLoadMore = true; |
|
|
|
setState(() {}); |
|
|
|
setState(() {}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
child: ListView.builder( |
|
|
|
child: (articles == null || articles.length == 0)? NoDataView( |
|
|
|
|
|
|
|
src: "assets/image/guan_zhu.png", |
|
|
|
|
|
|
|
isShowBtn: false, |
|
|
|
|
|
|
|
text: "目前暂无添加关注,可在推荐中关注自己喜欢的人哦~", |
|
|
|
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
|
|
|
margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w), |
|
|
|
|
|
|
|
):ListView.builder( |
|
|
|
physics: NeverScrollableScrollPhysics(), |
|
|
|
physics: NeverScrollableScrollPhysics(), |
|
|
|
itemBuilder: (context, position) { |
|
|
|
itemBuilder: (context, position) { |
|
|
|
return InkWell( |
|
|
|
return InkWell( |
|
|
@ -145,7 +153,9 @@ class _CommunityChildPage extends State<CommunityChildPage> with AutomaticKeepAl |
|
|
|
}, |
|
|
|
}, |
|
|
|
).then((value) { |
|
|
|
).then((value) { |
|
|
|
_onRefresh(); |
|
|
|
_onRefresh(); |
|
|
|
|
|
|
|
setState(() {}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
setState(() {}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
); |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|