buildView method
Implementation
@override
Widget buildView(BuildContext context, HomeViewModel? viewModel) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme
.of(context)
.colorScheme
.inversePrimary,
title: const Center(
child: Text("121212"),
)
),
body:SafeArea(
child:YRefresher(
controller: _refreshController,
enablePullUp: true,
onLoading: (){
_refreshController.loadNoData();
},
onRefresh: () {
Future.delayed(const Duration(seconds: 3),
() {
_refreshController.refreshToIdle();
});
},
child:GestureDetector(
child: Text("取消"),
onTap: (){
Navigator.pushNamed(context, "Second");
// print(_cancelToken?.isCancelled);
// _cancelToken?.cancel();
},),
) ,
)
,
);
}