|
|
|
@ -26,6 +26,10 @@ import 'activity_top_list.dart';
|
|
|
|
|
import 'article_list.dart'; |
|
|
|
|
|
|
|
|
|
class ArticlePage extends StatefulWidget { |
|
|
|
|
final Function onScroll; |
|
|
|
|
|
|
|
|
|
ArticlePage(this.onScroll); |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
State<StatefulWidget> createState() { |
|
|
|
|
return _ArticlePage(); |
|
|
|
@ -34,8 +38,8 @@ class ArticlePage extends StatefulWidget {
|
|
|
|
|
|
|
|
|
|
class _ArticlePage extends State<ArticlePage> |
|
|
|
|
with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { |
|
|
|
|
final ScrollController scrollController = ScrollController(); |
|
|
|
|
final RefreshController refreshController = RefreshController(); |
|
|
|
|
ScrollController sc = ScrollController(); |
|
|
|
|
|
|
|
|
|
ApiService apiService; |
|
|
|
|
List<GlobalKey> globaKeys = []; |
|
|
|
@ -50,7 +54,9 @@ class _ArticlePage extends State<ArticlePage>
|
|
|
|
|
@override |
|
|
|
|
void initState() { |
|
|
|
|
super.initState(); |
|
|
|
|
|
|
|
|
|
sc.addListener(() { |
|
|
|
|
widget.onScroll(); |
|
|
|
|
}); |
|
|
|
|
eventBus.on<EventType>().listen((event) { |
|
|
|
|
print("object: ArticlePage"); |
|
|
|
|
if (event.type < 3) { |
|
|
|
@ -204,7 +210,7 @@ class _ArticlePage extends State<ArticlePage>
|
|
|
|
|
queryArticleList(false); |
|
|
|
|
}, |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
scrollController: scrollController, |
|
|
|
|
scrollController: sc, |
|
|
|
|
child: Container( |
|
|
|
|
child: SingleChildScrollView( |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
@ -231,7 +237,7 @@ class _ArticlePage extends State<ArticlePage>
|
|
|
|
|
child: StoreTitleTab( |
|
|
|
|
brands, |
|
|
|
|
globaKeys, |
|
|
|
|
scrollController, |
|
|
|
|
sc, |
|
|
|
|
isScroll: true, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|