|
|
@@ -11,6 +11,7 @@ import 'package:zhiying_base_widget/pages/main_page/notifier/main_page_notifier. |
|
|
|
import 'package:zhiying_base_widget/utils/contants.dart'; |
|
|
|
import 'package:zhiying_base_widget/widgets/home/home_auth/home_auth.dart'; |
|
|
|
import 'package:zhiying_base_widget/widgets/others/mine_header_bg_widget.dart'; |
|
|
|
import 'package:zhiying_base_widget/widgets/refresh/refresh_header/refresh_header.dart'; |
|
|
|
import 'package:zhiying_comm/util/base_bloc.dart'; |
|
|
|
import 'package:zhiying_comm/zhiying_comm.dart'; |
|
|
|
|
|
|
@@ -67,7 +68,7 @@ class _MainPageContainerState extends State<_MainPageContainer> |
|
|
|
// _refreshController.loadComplete(); |
|
|
|
} |
|
|
|
|
|
|
|
void _onRefresh() async{ |
|
|
|
void _onRefresh() async { |
|
|
|
await Duration(microseconds: 3); |
|
|
|
_refreshController.refreshCompleted(); |
|
|
|
} |
|
|
@@ -107,6 +108,7 @@ class _MainPageContainerState extends State<_MainPageContainer> |
|
|
|
Provider.of<MainPageNotifier>(context, listen: false).reset(); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
///监听app生命周期变化 |
|
|
|
WidgetsBinding.instance.addObserver(this); |
|
|
|
IntellectCreate.checkAndCreateFirst(context); |
|
|
@@ -127,27 +129,27 @@ class _MainPageContainerState extends State<_MainPageContainer> |
|
|
|
body: MediaQuery.removePadding( |
|
|
|
removeTop: true, |
|
|
|
context: context, |
|
|
|
child: SmartRefresher( |
|
|
|
enablePullDown: true, |
|
|
|
enablePullUp: true, |
|
|
|
header: WaterDropHeader(), |
|
|
|
controller: _refreshController, |
|
|
|
onLoading: _onLoading, |
|
|
|
onRefresh: _onRefresh, |
|
|
|
child: Container( |
|
|
|
width: double.infinity, |
|
|
|
child: Stack( |
|
|
|
fit: StackFit.passthrough, |
|
|
|
children: <Widget>[ |
|
|
|
MineHeaderBgWidget( |
|
|
|
controller: _controller, |
|
|
|
), |
|
|
|
CustomScrollView( |
|
|
|
child: Container( |
|
|
|
width: double.infinity, |
|
|
|
child: Stack( |
|
|
|
fit: StackFit.passthrough, |
|
|
|
children: <Widget>[ |
|
|
|
MineHeaderBgWidget( |
|
|
|
controller: _controller, |
|
|
|
), |
|
|
|
SmartRefresher( |
|
|
|
enablePullDown: true, |
|
|
|
enablePullUp: false, |
|
|
|
header: RefreshHeader(), |
|
|
|
controller: _refreshController, |
|
|
|
onLoading: _onLoading, |
|
|
|
onRefresh: _onRefresh, |
|
|
|
child: CustomScrollView( |
|
|
|
controller: _controller, |
|
|
|
slivers: widgets, |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|