Browse Source

排版弹窗,排版任务页面,排版结束页面

dev-2.0
王子贤 2 months ago
parent
commit
0cf9f811ed
13 changed files with 949 additions and 76 deletions
  1. BIN
      assets/images/answer_icon.png
  2. BIN
      assets/images/daily_tasks.png
  3. BIN
      assets/images/get_out_icon.png
  4. BIN
      assets/images/hang_up_icon.png
  5. BIN
      assets/images/settlement_month.png
  6. BIN
      assets/images/settlement_today.png
  7. 142
      lib/controller/home/home_controller.dart
  8. 6
      lib/generated/assets.dart
  9. 216
      lib/pages/discover/settlement_page.dart
  10. 160
      lib/pages/discover/task_detail.dart
  11. 124
      lib/widget/live/live_room_invitation_list.dart
  12. 375
      lib/widget/live/live_room_notice_chat_panel.dart
  13. 2
      lib/widget/live/live_room_user_header.dart

BIN
assets/images/answer_icon.png

Before After
Width: 72  |  Height: 54  |  Size: 610 B

BIN
assets/images/daily_tasks.png

Before After
Width: 200  |  Height: 228  |  Size: 33 KiB

BIN
assets/images/get_out_icon.png

Before After
Width: 36  |  Height: 36  |  Size: 481 B

BIN
assets/images/hang_up_icon.png

Before After
Width: 105  |  Height: 104  |  Size: 1.1 KiB

BIN
assets/images/settlement_month.png

Before After
Width: 1300  |  Height: 176  |  Size: 9.8 KiB

BIN
assets/images/settlement_today.png

Before After
Width: 1300  |  Height: 176  |  Size: 9.7 KiB

142
lib/controller/home/home_controller.dart

@ -1,3 +1,8 @@
import 'dart:async';
import 'package:dating_touchme_app/generated/assets.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import '../../network/home_api.dart'; import '../../network/home_api.dart';
@ -35,6 +40,143 @@ class HomeController extends GetxController {
_homeApi = Get.find<HomeApi>(); _homeApi = Get.find<HomeApi>();
// //
loadInitialData(); loadInitialData();
// Timer.periodic(const Duration(seconds: 10), (t) {
// SmartDialog.show(
// alignment: Alignment.center,
// maskColor: Colors.black.withOpacity(0.5),
// onDismiss: () {
//
// },
// builder: (context) {
// // return LiveRoomGuestListDialog(
// // initialTab: isMaleSeat ? 1 : 0, // 0: , 1:
// // );
// return ClipRRect(
// borderRadius: BorderRadius.all(Radius.circular(16.w)),
// child: Material(
// child: Stack(
//
// children: [
// Container(
// width: 311.w,
// height: 210.w,
// color: Colors.white,
// padding: EdgeInsets.only(
// top: 53.w,
// left: 23.w,
// right: 23.w,
// bottom: 20.w
// ),
// child: Column(
// children: [
// Text(
// "主持人邀请您视频连麦",
// style: TextStyle(
// fontSize: 21.w,
// color: const Color.fromRGBO(117, 98, 249, 1),
// fontWeight: FontWeight.w500
// ),
// ),
// SizedBox(height: 15.w,),
// Text(
// "有相亲卡的用户免费",
// style: TextStyle(
// fontSize: 12.w,
// color: const Color.fromRGBO(87, 87, 87, 1),
// fontWeight: FontWeight.w500
// ),
// ),
// SizedBox(height: 28.w,),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Container(
// width: 128.w,
// height: 40.w,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.all(Radius.circular(12.w)),
// color: const Color.fromRGBO(237, 237, 237, 1)
// ),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Image.asset(
// Assets.imagesHangUpIcon,
// width: 26.w,
// height: 26.w,
// ),
// SizedBox(width: 5.w,),
// Text(
// "拒绝",
// style: TextStyle(
// fontSize: 15.w
// ),
// )
// ],
// ),
// ),
// Container(
// width: 128.w,
// height: 40.w,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.all(Radius.circular(12.w)),
// color: const Color.fromRGBO(117, 98, 249, 1)
// ),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Image.asset(
// Assets.imagesAnswerIcon,
// width: 18.w,
// height: 13.w,
// ),
// SizedBox(width: 5.w,),
// Text(
// "拒绝",
// style: TextStyle(
// fontSize: 15.w,
// color: Colors.white
// ),
// )
// ],
// ),
// ),
// ],
// )
// ],
// ),
// ),
// Positioned(
// top: 0,
// left: 0,
// child: Container(
// padding: EdgeInsets.symmetric(vertical: 5.w, horizontal: 15.w),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.only(
// topLeft: Radius.circular(16.w),
// bottomRight: Radius.circular(16.w),
// ),
// color: const Color.fromRGBO(117, 98, 249, 1)
// ),
// child: Text(
// "20玫瑰",
// style: TextStyle(
// fontSize: 14.w,
// color: Colors.white,
// fontWeight: FontWeight.w500
// ),
// ),
// ),
// )
// ],
// ),
// ),
// );
// },
// );
// //
// });
} }
/// ///

6
lib/generated/assets.dart

@ -71,6 +71,7 @@ class Assets {
static const String imagesAd = 'assets/images/ad.png'; static const String imagesAd = 'assets/images/ad.png';
static const String imagesAdd = 'assets/images/add.png'; static const String imagesAdd = 'assets/images/add.png';
static const String imagesAliPay = 'assets/images/ali_pay.png'; static const String imagesAliPay = 'assets/images/ali_pay.png';
static const String imagesAnswerIcon = 'assets/images/answer_icon.png';
static const String imagesAppLogo = 'assets/images/app_logo.jpg'; static const String imagesAppLogo = 'assets/images/app_logo.jpg';
static const String imagesArrow = 'assets/images/arrow.png'; static const String imagesArrow = 'assets/images/arrow.png';
static const String imagesArrowForwardRight = 'assets/images/arrow_forward_right.png'; static const String imagesArrowForwardRight = 'assets/images/arrow_forward_right.png';
@ -96,6 +97,7 @@ class Assets {
static const String imagesCheck = 'assets/images/check.png'; static const String imagesCheck = 'assets/images/check.png';
static const String imagesCloseArrow = 'assets/images/close_arrow.png'; static const String imagesCloseArrow = 'assets/images/close_arrow.png';
static const String imagesCustomer = 'assets/images/customer.png'; static const String imagesCustomer = 'assets/images/customer.png';
static const String imagesDailyTasks = 'assets/images/daily_tasks.png';
static const String imagesDiscoverNol = 'assets/images/discover_nol.png'; static const String imagesDiscoverNol = 'assets/images/discover_nol.png';
static const String imagesDiscoverPre = 'assets/images/discover_pre.png'; static const String imagesDiscoverPre = 'assets/images/discover_pre.png';
static const String imagesEdit = 'assets/images/edit.png'; static const String imagesEdit = 'assets/images/edit.png';
@ -113,6 +115,7 @@ class Assets {
static const String imagesFilterIcon = 'assets/images/filter_icon.png'; static const String imagesFilterIcon = 'assets/images/filter_icon.png';
static const String imagesFireIcon = 'assets/images/fire_icon.png'; static const String imagesFireIcon = 'assets/images/fire_icon.png';
static const String imagesFirstPay = 'assets/images/first_pay.png'; static const String imagesFirstPay = 'assets/images/first_pay.png';
static const String imagesGetOutIcon = 'assets/images/get_out_icon.png';
static const String imagesGift = 'assets/images/gift.png'; static const String imagesGift = 'assets/images/gift.png';
static const String imagesGift1 = 'assets/images/gift1.png'; static const String imagesGift1 = 'assets/images/gift1.png';
static const String imagesGift2 = 'assets/images/gift2.png'; static const String imagesGift2 = 'assets/images/gift2.png';
@ -121,6 +124,7 @@ class Assets {
static const String imagesGift5 = 'assets/images/gift5.png'; static const String imagesGift5 = 'assets/images/gift5.png';
static const String imagesGiftIcon = 'assets/images/gift_icon.png'; static const String imagesGiftIcon = 'assets/images/gift_icon.png';
static const String imagesGiftPic = 'assets/images/gift_pic.png'; static const String imagesGiftPic = 'assets/images/gift_pic.png';
static const String imagesHangUpIcon = 'assets/images/hang_up_icon.png';
static const String imagesHelpBg = 'assets/images/help_bg.png'; static const String imagesHelpBg = 'assets/images/help_bg.png';
static const String imagesHiIcon = 'assets/images/hi_icon.png'; static const String imagesHiIcon = 'assets/images/hi_icon.png';
static const String imagesHomeNol = 'assets/images/home_nol.png'; static const String imagesHomeNol = 'assets/images/home_nol.png';
@ -188,6 +192,8 @@ class Assets {
static const String imagesSendVideoCall = 'assets/images/send_video_call.png'; static const String imagesSendVideoCall = 'assets/images/send_video_call.png';
static const String imagesSetting = 'assets/images/setting.png'; static const String imagesSetting = 'assets/images/setting.png';
static const String imagesSettingIcon = 'assets/images/setting_icon.png'; static const String imagesSettingIcon = 'assets/images/setting_icon.png';
static const String imagesSettlementMonth = 'assets/images/settlement_month.png';
static const String imagesSettlementToday = 'assets/images/settlement_today.png';
static const String imagesShop = 'assets/images/shop.png'; static const String imagesShop = 'assets/images/shop.png';
static const String imagesSplash = 'assets/images/splash.png'; static const String imagesSplash = 'assets/images/splash.png';
static const String imagesSubscript = 'assets/images/subscript.png'; static const String imagesSubscript = 'assets/images/subscript.png';

216
lib/pages/discover/settlement_page.dart

@ -0,0 +1,216 @@
import 'package:dating_touchme_app/components/page_appbar.dart';
import 'package:dating_touchme_app/generated/assets.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class SettlementPage extends StatefulWidget {
const SettlementPage({super.key});
@override
State<SettlementPage> createState() => _SettlementPageState();
}
class _SettlementPageState extends State<SettlementPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PageAppbar(title: "", backgroundColor: Colors.transparent, color: Colors.white,),
backgroundColor: const Color.fromRGBO(19, 16, 47, 1),
body: Container(
padding: EdgeInsets.only(
top: 100.w,
right: 25.w,
bottom: 25.w,
left: 25.w
),
child: Column(
children: [
Text(
"开心的橘子",
style: TextStyle(
fontSize: 14.w,
color: Colors.white
),
),
SizedBox(height: 62.w,),
Stack(
clipBehavior: Clip.none,
children: [
Container(
width: 325.w,
height: 154.w,
padding: EdgeInsets.only(
top: 70.w,
right: 26.w,
bottom: 47.w,
left: 26.w,
),
decoration: BoxDecoration(
border: Border.all(width: 1.w, color: const Color.fromRGBO(117, 98, 249, 1)),
color: const Color.fromRGBO(117, 98, 249, .2)
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
RichText(
text: TextSpan(
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w500
),
children: [
TextSpan(
text: "0.35",
style: TextStyle(
fontSize: 23.w,
)
),
TextSpan(
text: "小时",
style: TextStyle(
fontSize: 12.w,
)
)
]
),
),
Text(
"今日总开播",
style: TextStyle(
fontSize: 12.w,
color: const Color.fromRGBO(117, 98, 249, 1)
),
)
],
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
RichText(
text: TextSpan(
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w500
),
children: [
TextSpan(
text: "0.35",
style: TextStyle(
fontSize: 23.w,
)
),
TextSpan(
text: "小时",
style: TextStyle(
fontSize: 12.w,
)
)
]
),
),
Text(
"今日总开播",
style: TextStyle(
fontSize: 12.w,
color: const Color.fromRGBO(117, 98, 249, 1)
),
)
],
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
RichText(
text: TextSpan(
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w500
),
children: [
TextSpan(
text: "0.35",
style: TextStyle(
fontSize: 23.w,
)
),
TextSpan(
text: "小时",
style: TextStyle(
fontSize: 12.w,
)
)
]
),
),
Text(
"今日总开播",
style: TextStyle(
fontSize: 12.w,
color: const Color.fromRGBO(117, 98, 249, 1)
),
)
],
),
],
),
),
Positioned(
left: 117.w,
top: -52.w,
child: Container(
width: 90.w,
height: 90.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(90.w)),
border: Border.all(width: 2.w, color: Colors.white)
),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(86.w)),
child: Image.asset(
Assets.imagesUserAvatar,
width: 86.w,
height: 86.w,
),
),
),
)
],
),
SizedBox(height: 18.w,),
Image.asset(
Assets.imagesSettlementToday,
width: 325.w,
),
SizedBox(height: 7.w,),
Image.asset(
Assets.imagesSettlementMonth,
width: 325.w,
),
Spacer(),
Container(
width: 325.w,
height: 45.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(42.w)),
color: const Color.fromRGBO(117, 98, 249, 1)
),
child: Center(
child: Text(
"返回首页",
style: TextStyle(
fontSize: 14.w,
color: Colors.white,
fontWeight: FontWeight.w500
),
),
),
)
],
),
),
);
}
}

160
lib/pages/discover/task_detail.dart

@ -0,0 +1,160 @@
import 'package:dating_touchme_app/components/page_appbar.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class TaskDetail extends StatefulWidget {
const TaskDetail({super.key});
@override
State<TaskDetail> createState() => _TaskDetailState();
}
class _TaskDetailState extends State<TaskDetail> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PageAppbar(title: "任务详情"),
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.symmetric(
vertical: 20.w,
horizontal: 15.w
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 228.w,
margin: EdgeInsets.only(bottom: 21.w),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(width: 1.w, color: const Color.fromRGBO(212, 212, 212, 1))
)
),
child: Row(
children: [
Container(
width: 229.w,
decoration: BoxDecoration(
border: Border(
right: BorderSide(width: 1.w, color: const Color.fromRGBO(212, 212, 212, 1))
)
),
child: Column(
children: [
Container(
height: 37.w,
color: const Color.fromRGBO(247, 247, 247, 1),
child: Center(
child: Text(
"任务详情",
style: TextStyle(
fontSize: 14.w
),
),
),
),
Container(
height: 50.w,
padding: EdgeInsets.only(left: 14.w, right: 18.w),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(width: 1.w, color: const Color.fromRGBO(212, 212, 212, 1))
)
),
alignment: Alignment.centerLeft,
child: Text(
"1.有效开播时长≥4小时;",
style: TextStyle(
fontSize: 14.w
),
),
),
Container(
height: 70.w,
padding: EdgeInsets.only(left: 14.w, right: 18.w),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(width: 1.w, color: const Color.fromRGBO(212, 212, 212, 1))
)
),
alignment: Alignment.centerLeft,
child: Text(
"2.邀请1个女嘉宾上麦,每个女嘉宾≥3个男嘉宾打卡方可下麦;",
style: TextStyle(
fontSize: 14.w
),
),
),
Container(
height: 70.w,
padding: EdgeInsets.only(left: 14.w, right: 18.w),
alignment: Alignment.centerLeft,
child: Text(
"3.直播间打卡人数≥5人,每个男嘉宾上麦时间≥3分钟算一次打卡",
style: TextStyle(
fontSize: 14.w
),
),
)
],
),
),
Expanded(
child: Column(
children: [
Container(
height: 37.w,
color: const Color.fromRGBO(247, 247, 247, 1),
child: Center(
child: Text(
"任务奖励",
style: TextStyle(
fontSize: 14.w
),
),
),
),
Expanded(
child: Container(
padding: EdgeInsets.only(left: 14.w, right: 18.w),
alignment: Alignment.center,
child: Text(
"10元",
style: TextStyle(
fontSize: 18.w,
color: const Color.fromRGBO(239, 19, 46, 1)
),
),
),
)
],
),
)
],
),
),
Text(
"任务说明",
style: TextStyle(
fontSize: 14.w
),
),
SizedBox(height: 6.w,),
Text(
"1.奖励场景:三人相亲直播间\n"
"2.结算时间:次日9:00\n"
"3.付费上麦男嘉宾次数:20玫瑰+体验卡\n"
"4.奖励可叠加",
style: TextStyle(
fontSize: 14.w,
color: const Color.fromRGBO(144, 144, 144, 1)
),
)
],
),
),
),
);
}
}

124
lib/widget/live/live_room_invitation_list.dart

@ -214,11 +214,125 @@ class _LiveRoomInvitationListState extends State<LiveRoomInvitationList> with Ti
// return LiveRoomGuestListDialog( // return LiveRoomGuestListDialog(
// initialTab: isMaleSeat ? 1 : 0, // 0: , 1: // initialTab: isMaleSeat ? 1 : 0, // 0: , 1:
// ); // );
return Material(
child: Container(
width: 200.w,
height: 200.w,
color: Colors.white,
return ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(16.w)),
child: Material(
child: Stack(
children: [
Container(
width: 311.w,
height: 210.w,
color: Colors.white,
padding: EdgeInsets.only(
top: 53.w,
left: 23.w,
right: 23.w,
bottom: 20.w
),
child: Column(
children: [
Text(
"主持人邀请您视频连麦",
style: TextStyle(
fontSize: 21.w,
color: const Color.fromRGBO(117, 98, 249, 1),
fontWeight: FontWeight.w500
),
),
SizedBox(height: 15.w,),
Text(
"有相亲卡的用户免费",
style: TextStyle(
fontSize: 12.w,
color: const Color.fromRGBO(87, 87, 87, 1),
fontWeight: FontWeight.w500
),
),
SizedBox(height: 28.w,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: 128.w,
height: 40.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(12.w)),
color: const Color.fromRGBO(237, 237, 237, 1)
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
Assets.imagesHangUpIcon,
width: 26.w,
height: 26.w,
),
SizedBox(width: 5.w,),
Text(
"拒绝",
style: TextStyle(
fontSize: 15.w
),
)
],
),
),
Container(
width: 128.w,
height: 40.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(12.w)),
color: const Color.fromRGBO(117, 98, 249, 1)
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
Assets.imagesAnswerIcon,
width: 18.w,
height: 13.w,
),
SizedBox(width: 5.w,),
Text(
"拒绝",
style: TextStyle(
fontSize: 15.w,
color: Colors.white
),
)
],
),
),
],
)
],
),
),
Positioned(
top: 0,
left: 0,
child: Container(
padding: EdgeInsets.symmetric(vertical: 5.w, horizontal: 15.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(16.w),
bottomRight: Radius.circular(16.w),
),
color: const Color.fromRGBO(117, 98, 249, 1)
),
child: Text(
"20玫瑰",
style: TextStyle(
fontSize: 14.w,
color: Colors.white,
fontWeight: FontWeight.w500
),
),
),
)
],
),
), ),
); );
}, },

375
lib/widget/live/live_room_notice_chat_panel.dart

@ -1,13 +1,16 @@
import 'package:dating_touchme_app/controller/discover/room_controller.dart'; import 'package:dating_touchme_app/controller/discover/room_controller.dart';
import 'package:dating_touchme_app/controller/global.dart'; import 'package:dating_touchme_app/controller/global.dart';
import 'package:dating_touchme_app/controller/overlay_controller.dart';
import 'package:dating_touchme_app/extension/ex_widget.dart'; import 'package:dating_touchme_app/extension/ex_widget.dart';
import 'package:dating_touchme_app/generated/assets.dart'; import 'package:dating_touchme_app/generated/assets.dart';
import 'package:dating_touchme_app/pages/discover/task_detail.dart';
import 'package:dating_touchme_app/widget/live/live_room_chat_item.dart'; import 'package:dating_touchme_app/widget/live/live_room_chat_item.dart';
import 'package:dating_touchme_app/widget/live/live_recharge_popup.dart'; import 'package:dating_touchme_app/widget/live/live_recharge_popup.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
class LiveRoomNoticeChatPanel extends StatefulWidget { class LiveRoomNoticeChatPanel extends StatefulWidget {
const LiveRoomNoticeChatPanel({super.key}); const LiveRoomNoticeChatPanel({super.key});
@ -77,6 +80,10 @@ class _LiveRoomNoticeChatPanelState extends State<LiveRoomNoticeChatPanel> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final roomController = Get.find<RoomController>();
final overlayController = Get.find<OverlayController>();
final isHost = roomController.currentRole == CurrentRole.broadcaster;
return Container( return Container(
padding: EdgeInsets.only(left: 13.w, right: 9.w), padding: EdgeInsets.only(left: 13.w, right: 9.w),
child: Row( child: Row(
@ -126,83 +133,311 @@ class _LiveRoomNoticeChatPanelState extends State<LiveRoomNoticeChatPanel> {
}), }),
), ),
SizedBox(width: 18.w), SizedBox(width: 18.w),
Obx((){
if(controller.rtcChannelDetail.value?.maleInfo == null && GlobalData().userData?.genderCode == 0 && controller.currentRole != CurrentRole.broadcaster ||
controller.rtcChannelDetail.value?.femaleInfo == null && GlobalData().userData?.genderCode == 1 && controller.currentRole != CurrentRole.broadcaster ||
controller.isLive.value && controller.currentRole != CurrentRole.broadcaster){
return Container(
width: 120.w,
height: 55.w,
padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 10.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.w),
gradient: LinearGradient(
colors: controller.isLive.value ? [Colors.grey, Colors.grey] : [Color(0xFF7C63FF), Color(0xFF987CFF)],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
),
child: Row(
children: [
Image.asset(
Assets.imagesRoomVideo,
width: 26.w,
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Obx((){
if(controller.rtcChannelDetail.value?.maleInfo == null && GlobalData().userData?.genderCode == 0 && controller.currentRole != CurrentRole.broadcaster ||
controller.rtcChannelDetail.value?.femaleInfo == null && GlobalData().userData?.genderCode == 1 && controller.currentRole != CurrentRole.broadcaster ||
controller.isLive.value && controller.currentRole != CurrentRole.broadcaster){
return Container(
width: 120.w,
height: 55.w,
padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 10.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.w),
gradient: LinearGradient(
colors: controller.isLive.value ? [Colors.grey, Colors.grey] : [Color(0xFF7C63FF), Color(0xFF987CFF)],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
), ),
SizedBox(width: 8.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
child: Row(
children: [ children: [
Text(
controller.isLive.value
? '下麦结束'
: (GlobalData().userData?.genderCode == 0 ? '视频相亲' : '免费相亲'),
style: TextStyle(
fontSize: 13.w,
color: Colors.white,
fontWeight: FontWeight.w600,
),
Image.asset(
Assets.imagesRoomVideo,
width: 26.w,
),
SizedBox(width: 8.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
controller.isLive.value
? '下麦结束'
: (GlobalData().userData?.genderCode == 0 ? '视频相亲' : '免费相亲'),
style: TextStyle(
fontSize: 13.w,
color: Colors.white,
fontWeight: FontWeight.w600,
),
),
SizedBox(height: 2.w),
//
_buildLinkMicCardText(),
],
), ),
SizedBox(height: 2.w),
//
_buildLinkMicCardText(),
], ],
), ),
],
),
).onTap(() async{
//
if (!controller.isLive.value) {
final userData = GlobalData().userData;
final isMale = userData?.genderCode == 0;
if (isMale) {
final linkMicCard = controller.linkMicCard.value;
final cardNum = linkMicCard?.num ?? 0;
// "上麦20玫瑰"20
if (cardNum == 0 && controller.roseCount.value < 20) {
controller.setDialogDismiss(true);
SmartDialog.show(
alignment: Alignment.bottomCenter,
maskColor: Colors.black.withOpacity(0.5),
onDismiss: (){
controller.setDialogDismiss(false);
},
builder: (_) => const LiveRechargePopup(),
);
return;
).onTap(() async{
//
if (!controller.isLive.value) {
final userData = GlobalData().userData;
final isMale = userData?.genderCode == 0;
if (isMale) {
final linkMicCard = controller.linkMicCard.value;
final cardNum = linkMicCard?.num ?? 0;
// "上麦20玫瑰"20
if (cardNum == 0 && controller.roseCount.value < 20) {
controller.setDialogDismiss(true);
SmartDialog.show(
alignment: Alignment.bottomCenter,
maskColor: Colors.black.withOpacity(0.5),
onDismiss: (){
controller.setDialogDismiss(false);
},
builder: (_) => const LiveRechargePopup(),
);
return;
}
}
} }
}
}
if(controller.isLive.value){
await controller.leaveChat();
}else{
await controller.joinChat(GlobalData().userData?.genderCode == 0 ? CurrentRole.maleAudience : CurrentRole.femaleAudience);
if(controller.isLive.value){
await controller.leaveChat();
}else{
await controller.joinChat(GlobalData().userData?.genderCode == 0 ? CurrentRole.maleAudience : CurrentRole.femaleAudience);
}
});
} }
});
}
return const SizedBox();
}),
return const SizedBox();
}),
if(isHost) Image.asset(
Assets.imagesDailyTasks,
width: 70.w,
).onTap((){
//
FocusScope.of(context).unfocus();
// overlay
SmartDialog.dismiss();
roomController.setDialogDismiss(true);
SmartDialog.show(
alignment: Alignment.bottomCenter,
maskColor: TDTheme.of(context).fontGyColor2,
onDismiss: (){
roomController.setDialogDismiss(false);
},
builder: (_) {
return ClipRRect(
borderRadius: BorderRadius.vertical(top: Radius.circular(9.w)),
child: Material(
color: Colors.white,
child: Container(
width: 375.w,
height: 336.w,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color.fromRGBO(236, 224, 255, 1), // 0%
Color.fromRGBO(247, 247, 247, 1), // 100%
],
),
),
child: Column(
children: [
SizedBox(
height: 77.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: 68.w,
padding: EdgeInsets.only(left: 15.w),
alignment: Alignment.centerLeft,
child: Icon(
Icons.keyboard_arrow_left,
size: 26.w,
color: const Color.fromRGBO(144, 144, 144, 1),
),
),
Text(
"今日任务",
style: TextStyle(
fontSize: 21.w,
fontWeight: FontWeight.w700
),
),
Container(
width: 68.w,
height: 22.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.horizontal(left: Radius.circular(22.w)),
color: Colors.white
),
child: Center(
child: Text(
"任务详情",
style: TextStyle(
fontSize: 12.w,
color: const Color.fromRGBO(144, 144, 144, 1)
),
),
),
).onTap(() async {
//
FocusScope.of(context).unfocus();
// overlay
await SmartDialog.dismiss();
Get.to(() => TaskDetail());
})
],
),
),
SingleChildScrollView(
child: Container(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Column(
children: [
Container(
width: 350.w,
margin: EdgeInsets.only(bottom: 10.w),
padding: EdgeInsets.only(
top: 15.w,
right: 10.w,
bottom: 21.w,
left: 12.w
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"开播4小时",
style: TextStyle(
fontSize: 14.w
),
),
Text(
"50/240分钟",
style: TextStyle(
fontSize: 12.w,
color: const Color.fromRGBO(144, 144, 144, 1)
),
)
],
),
SizedBox(height: 10.w,),
TDProgress(
type: TDProgressType.linear,
value: 0.5,
strokeWidth: 6,
progressLabelPosition: TDProgressLabelPosition.inside,
showLabel: false,
)
],
),
),
Container(
width: 350.w,
margin: EdgeInsets.only(bottom: 10.w),
padding: EdgeInsets.only(
top: 15.w,
right: 10.w,
bottom: 21.w,
left: 12.w
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"开播4小时",
style: TextStyle(
fontSize: 14.w
),
),
Text(
"50/240分钟",
style: TextStyle(
fontSize: 12.w,
color: const Color.fromRGBO(144, 144, 144, 1)
),
)
],
),
SizedBox(height: 10.w,),
TDProgress(
type: TDProgressType.linear,
value: 0.5,
strokeWidth: 6,
progressLabelPosition: TDProgressLabelPosition.inside,
showLabel: false,
)
],
),
),
Container(
width: 350.w,
margin: EdgeInsets.only(bottom: 10.w),
padding: EdgeInsets.only(
top: 15.w,
right: 10.w,
bottom: 21.w,
left: 12.w
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"开播4小时",
style: TextStyle(
fontSize: 14.w
),
),
Text(
"50/240分钟",
style: TextStyle(
fontSize: 12.w,
color: const Color.fromRGBO(144, 144, 144, 1)
),
)
],
),
SizedBox(height: 10.w,),
TDProgress(
type: TDProgressType.linear,
value: 0.5,
strokeWidth: 6,
progressLabelPosition: TDProgressLabelPosition.inside,
showLabel: false,
)
],
),
),
],
),
),
)
],
),
),
),
);
},
);
})
],
),
], ],
), ),
); );

2
lib/widget/live/live_room_user_header.dart

@ -296,7 +296,7 @@ class LiveRoomUserHeader extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Image.asset( Image.asset(
Assets.imagesMicOff,
Assets.imagesGetOutIcon,
width: 15.w, width: 15.w,
), ),
SizedBox(width: 5.w), SizedBox(width: 5.w),

Loading…
Cancel
Save