|
|
|
@ -112,22 +112,22 @@ class _DatingPageState extends State<DatingPage> |
|
|
|
), |
|
|
|
); |
|
|
|
} |
|
|
|
if (discoverController.rtcChannelList.isEmpty) { |
|
|
|
return Center( |
|
|
|
child: Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
Image.asset(Assets.imagesRtcEmpty, width: 332.w, height: 222.w), |
|
|
|
const SizedBox(height: 24), |
|
|
|
Text('暂无直播频道,点击刷新', style: TextStyle(fontSize: 14.w, color: Colors.black38)), |
|
|
|
const SizedBox(height: 64), |
|
|
|
], |
|
|
|
), |
|
|
|
).onTap((){ |
|
|
|
discoverController.loadRtcChannelPage(); |
|
|
|
}); |
|
|
|
} |
|
|
|
// if (discoverController.rtcChannelList.isEmpty) { |
|
|
|
// return Center( |
|
|
|
// child: Column( |
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
// mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
// children: [ |
|
|
|
// Image.asset(Assets.imagesRtcEmpty, width: 332.w, height: 222.w), |
|
|
|
// const SizedBox(height: 24), |
|
|
|
// Text('暂无直播频道,点击刷新', style: TextStyle(fontSize: 14.w, color: Colors.black38)), |
|
|
|
// const SizedBox(height: 64), |
|
|
|
// ], |
|
|
|
// ), |
|
|
|
// ).onTap((){ |
|
|
|
// discoverController.loadRtcChannelPage(); |
|
|
|
// }); |
|
|
|
// } |
|
|
|
return EasyRefresh( |
|
|
|
controller: _refreshController, |
|
|
|
header: const ClassicHeader( |
|
|
|
@ -151,7 +151,23 @@ class _DatingPageState extends State<DatingPage> |
|
|
|
_refreshController.finishRefresh(IndicatorResult.fail); |
|
|
|
} |
|
|
|
}, |
|
|
|
child: GridView.builder( |
|
|
|
child: discoverController.rtcChannelList.isEmpty ? SizedBox( |
|
|
|
height: 821.h, |
|
|
|
child: SingleChildScrollView( |
|
|
|
child: Center( |
|
|
|
child: Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
Image.asset(Assets.imagesRtcEmpty, width: 332.w, height: 222.w), |
|
|
|
const SizedBox(height: 24), |
|
|
|
Text('暂无直播频道,下拉刷新', style: TextStyle(fontSize: 14.w, color: Colors.black38)), |
|
|
|
const SizedBox(height: 64), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
) : GridView.builder( |
|
|
|
padding: EdgeInsets.symmetric(vertical: 5.w, horizontal: 0), |
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( |
|
|
|
crossAxisCount: 2, // 每行2个 |
|
|
|
|