Browse Source

优化用户详情央视

dev-2.0
王子贤 2 weeks ago
parent
commit
f7877c6897
4 changed files with 37 additions and 23 deletions
  1. 3
      lib/components/home_appbar.dart
  2. 50
      lib/pages/discover/dating_page.dart
  3. 3
      lib/pages/home/home_page.dart
  4. 4
      lib/pages/home/user_information_page.dart

3
lib/components/home_appbar.dart

@ -29,7 +29,6 @@ class _HomeAppbarState extends State<HomeAppbar> {
children: [
Container(
height: ScreenUtil().setWidth(54),
padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(17)),
child: Stack(
children: [
Row(
@ -48,7 +47,7 @@ class _HomeAppbarState extends State<HomeAppbar> {
});
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(13)),
margin: EdgeInsets.only(right: ScreenUtil().setWidth(26)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,

50
lib/pages/discover/dating_page.dart

@ -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

3
lib/pages/home/home_page.dart

@ -80,9 +80,8 @@ class _HomePageState extends State<HomePage>
return AppBar(
backgroundColor: Colors.transparent,
elevation: 0,
centerTitle: true,
centerTitle: false,
toolbarHeight: 56,
titleSpacing: 0,
title: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,

4
lib/pages/home/user_information_page.dart

@ -339,8 +339,8 @@ class UserInformationPage extends StatelessWidget {
color: const Color.fromRGBO(144, 144, 144, 1)
),
),
SizedBox(height: 11.w,),
Wrap(
if(false) SizedBox(height: 11.w,),
if(false) Wrap(
spacing: 12.w,
runSpacing: 12.w,
children: [

Loading…
Cancel
Save