6 changed files with 370 additions and 270 deletions
Split View
Diff Options
-
4lib/pages/discover/live_room_page.dart
-
15lib/rtc/rtc_manager.dart
-
191lib/widget/live/live_room_anchor_showcase.dart
-
235lib/widget/live/live_room_invitation_list.dart
-
121lib/widget/live/live_room_user_header.dart
-
74lib/widget/live/live_room_user_profile_dialog.dart
@ -0,0 +1,235 @@ |
|||
import 'package:dating_touchme_app/controller/discover/room_controller.dart'; |
|||
import 'package:dating_touchme_app/extension/ex_widget.dart'; |
|||
import 'package:dating_touchme_app/generated/assets.dart'; |
|||
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 LiveRoomInvitationList extends StatefulWidget { |
|||
const LiveRoomInvitationList({super.key}); |
|||
|
|||
@override |
|||
State<LiveRoomInvitationList> createState() => _LiveRoomInvitationListState(); |
|||
} |
|||
|
|||
class _LiveRoomInvitationListState extends State<LiveRoomInvitationList> with TickerProviderStateMixin { |
|||
|
|||
|
|||
TabController? _tabController; |
|||
|
|||
|
|||
final RoomController _roomController = Get.find<RoomController>(); |
|||
|
|||
@override |
|||
void initState() { |
|||
super.initState(); |
|||
_tabController = TabController(length: 3, vsync: this); |
|||
} |
|||
|
|||
@override |
|||
Widget build(BuildContext context) { |
|||
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 |
|||
), |
|||
), |
|||
), |
|||
).onTap(() { |
|||
_roomController.setDialogDismiss(true); |
|||
SmartDialog.show( |
|||
alignment: Alignment.center, |
|||
maskColor: Colors.black.withOpacity(0.5), |
|||
onDismiss: () { |
|||
_roomController.setDialogDismiss(false); |
|||
}, |
|||
builder: (context) { |
|||
// return LiveRoomGuestListDialog( |
|||
// initialTab: isMaleSeat ? 1 : 0, // 0: 女嘉宾, 1: 男嘉宾 |
|||
// ); |
|||
return Material( |
|||
child: Container( |
|||
width: 200.w, |
|||
height: 200.w, |
|||
color: Colors.white, |
|||
), |
|||
); |
|||
}, |
|||
); |
|||
}) |
|||
], |
|||
) |
|||
], |
|||
), |
|||
), |
|||
); |
|||
} |
|||
} |
|||
|
|||
Write
Preview
Loading…
Cancel
Save