|
|
|
@ -18,15 +18,15 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
|
class CommunityChildPage extends StatefulWidget { |
|
|
|
|
final String typeStr; |
|
|
|
|
|
|
|
|
|
CommunityChildPage(this.typeStr); |
|
|
|
|
CommunityChildPage(Key key, this.typeStr): super(key: key); |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
State<StatefulWidget> createState() { |
|
|
|
|
return _CommunityChildPage(); |
|
|
|
|
return CommunityChildPageState(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class _CommunityChildPage extends State<CommunityChildPage> with AutomaticKeepAliveClientMixin { |
|
|
|
|
class CommunityChildPageState extends State<CommunityChildPage> with AutomaticKeepAliveClientMixin { |
|
|
|
|
RefreshController refreshController = RefreshController(); |
|
|
|
|
ApiService apiService; |
|
|
|
|
int pageNum = 1; |
|
|
|
@ -38,10 +38,10 @@ class _CommunityChildPage extends State<CommunityChildPage> with AutomaticKeepAl
|
|
|
|
|
@override |
|
|
|
|
void initState() { |
|
|
|
|
super.initState(); |
|
|
|
|
_onRefresh(); |
|
|
|
|
onRefresh(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_onRefresh() async { |
|
|
|
|
onRefresh() async { |
|
|
|
|
setState(() {}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -120,7 +120,7 @@ class _CommunityChildPage extends State<CommunityChildPage> with AutomaticKeepAl
|
|
|
|
|
return MyFooter(mode); |
|
|
|
|
}, |
|
|
|
|
), |
|
|
|
|
onRefresh: _onRefresh, |
|
|
|
|
onRefresh: onRefresh, |
|
|
|
|
onLoading: () { |
|
|
|
|
isLoadMore = true; |
|
|
|
|
setState(() {}); |
|
|
|
@ -142,7 +142,7 @@ class _CommunityChildPage extends State<CommunityChildPage> with AutomaticKeepAl
|
|
|
|
|
isList: true, |
|
|
|
|
exitFull: () { |
|
|
|
|
setState(() { |
|
|
|
|
_onRefresh(); |
|
|
|
|
onRefresh(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
), |
|
|
|
@ -154,7 +154,7 @@ class _CommunityChildPage extends State<CommunityChildPage> with AutomaticKeepAl
|
|
|
|
|
"userId": userId, |
|
|
|
|
}, |
|
|
|
|
).then((value) { |
|
|
|
|
_onRefresh(); |
|
|
|
|
onRefresh(); |
|
|
|
|
setState(() {}); |
|
|
|
|
}); |
|
|
|
|
setState(() {}); |
|
|
|
|