|
|
|
@ -10,6 +10,7 @@ import 'package:flutter/material.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
|
|
|
import 'package:get/get.dart'; |
|
|
|
import 'package:tdesign_flutter/tdesign_flutter.dart'; |
|
|
|
|
|
|
|
class LiveRoomAnchorShowcase extends StatefulWidget { |
|
|
|
const LiveRoomAnchorShowcase({super.key}); |
|
|
|
@ -18,10 +19,18 @@ class LiveRoomAnchorShowcase extends StatefulWidget { |
|
|
|
State<LiveRoomAnchorShowcase> createState() => _LiveRoomAnchorShowcaseState(); |
|
|
|
} |
|
|
|
|
|
|
|
class _LiveRoomAnchorShowcaseState extends State<LiveRoomAnchorShowcase> { |
|
|
|
class _LiveRoomAnchorShowcaseState extends State<LiveRoomAnchorShowcase> with TickerProviderStateMixin { |
|
|
|
final RTCManager _rtcManager = RTCManager.instance; |
|
|
|
final RoomController _roomController = Get.find<RoomController>(); |
|
|
|
|
|
|
|
TabController? _tabController; |
|
|
|
|
|
|
|
@override |
|
|
|
void initState() { |
|
|
|
super.initState(); |
|
|
|
_tabController = TabController(length: 3, vsync: this); |
|
|
|
} |
|
|
|
|
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
return ValueListenableBuilder<bool>( |
|
|
|
@ -384,8 +393,187 @@ class _LiveRoomAnchorShowcaseState extends State<LiveRoomAnchorShowcase> { |
|
|
|
_roomController.setDialogDismiss(false); |
|
|
|
}, |
|
|
|
builder: (context) { |
|
|
|
return LiveRoomGuestListDialog( |
|
|
|
initialTab: isMaleSeat ? 1 : 0, // 0: 女嘉宾, 1: 男嘉宾 |
|
|
|
// return LiveRoomGuestListDialog( |
|
|
|
// initialTab: isMaleSeat ? 1 : 0, // 0: 女嘉宾, 1: 男嘉宾 |
|
|
|
// ); |
|
|
|
return Material( |
|
|
|
borderRadius: BorderRadius.vertical(top: Radius.circular(9.w)), |
|
|
|
child: Container( |
|
|
|
height: 500.w, |
|
|
|
padding: EdgeInsets.symmetric(vertical: 10.w), |
|
|
|
child: Column( |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
height: 42.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
), |
|
|
|
child: TDTabBar( |
|
|
|
backgroundColor: Colors.transparent, |
|
|
|
tabs: [ |
|
|
|
TDTab(text: '房间内'), |
|
|
|
TDTab(text: '上麦过'), |
|
|
|
TDTab(text: '好友'), |
|
|
|
], |
|
|
|
controller: _tabController, |
|
|
|
showIndicator: true, |
|
|
|
onTap: (int i) async { |
|
|
|
|
|
|
|
}, |
|
|
|
), |
|
|
|
), |
|
|
|
Expanded( |
|
|
|
child: Container( |
|
|
|
padding: EdgeInsets.all(10.w), |
|
|
|
child: Column( |
|
|
|
children: [ |
|
|
|
Expanded( |
|
|
|
child: SingleChildScrollView( |
|
|
|
child: Column( |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
margin: EdgeInsets.symmetric(vertical: 10.w), |
|
|
|
child: Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
Row( |
|
|
|
children: [ |
|
|
|
Image.asset( |
|
|
|
Assets.imagesUserAvatar, |
|
|
|
width: 40.w, |
|
|
|
height: 40.w, |
|
|
|
), |
|
|
|
SizedBox(width: 5.w,), |
|
|
|
Column( |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
"开心", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.w |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
"22岁", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.w, |
|
|
|
color: const Color.fromRGBO(121, 121, 121, 1) |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
|
|
|
|
Checkbox( |
|
|
|
value: false, |
|
|
|
onChanged: (value) { |
|
|
|
|
|
|
|
}, |
|
|
|
activeColor: const Color.fromRGBO(117, 98, 249, 1), |
|
|
|
side: const BorderSide(color: Colors.grey), |
|
|
|
shape: const CircleBorder(), |
|
|
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
Container( |
|
|
|
margin: EdgeInsets.symmetric(vertical: 10.w), |
|
|
|
child: Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
Row( |
|
|
|
children: [ |
|
|
|
Image.asset( |
|
|
|
Assets.imagesUserAvatar, |
|
|
|
width: 40.w, |
|
|
|
height: 40.w, |
|
|
|
), |
|
|
|
SizedBox(width: 5.w,), |
|
|
|
Column( |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
"开心", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.w |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
"22岁", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.w, |
|
|
|
color: const Color.fromRGBO(121, 121, 121, 1) |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
|
|
|
|
Checkbox( |
|
|
|
value: false, |
|
|
|
onChanged: (value) { |
|
|
|
|
|
|
|
}, |
|
|
|
activeColor: const Color.fromRGBO(117, 98, 249, 1), |
|
|
|
side: const BorderSide(color: Colors.grey), |
|
|
|
shape: const CircleBorder(), |
|
|
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
width: 170.w, |
|
|
|
height: 42.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(42.w)), |
|
|
|
color: const Color.fromRGBO(237, 237, 237, 1) |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: Text( |
|
|
|
"取消", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14.w, |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Container( |
|
|
|
width: 170.w, |
|
|
|
height: 42.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 |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
}, |
|
|
|
); |
|
|
|
|