|
|
@ -123,84 +123,90 @@ class _LiveRoomPageState extends State<LiveRoomPage> { |
|
|
|
|
|
|
|
|
@override |
|
|
@override |
|
|
Widget build(BuildContext context) { |
|
|
Widget build(BuildContext context) { |
|
|
return Scaffold( |
|
|
|
|
|
body: Stack( |
|
|
|
|
|
children: [ |
|
|
|
|
|
Container( |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
gradient: LinearGradient( |
|
|
|
|
|
begin: Alignment.topCenter, |
|
|
|
|
|
end: Alignment.bottomCenter, |
|
|
|
|
|
colors: [ |
|
|
|
|
|
Color.fromRGBO(248, 242, 255, 1), |
|
|
|
|
|
Color.fromRGBO(247, 247, 247, 1), |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
return PopScope( |
|
|
|
|
|
onPopInvokedWithResult: (bool didPop, Object? result) async { |
|
|
|
|
|
_overlayController.toggle(); |
|
|
|
|
|
Get.back(); |
|
|
|
|
|
}, |
|
|
|
|
|
child: Scaffold( |
|
|
|
|
|
body: Stack( |
|
|
|
|
|
children: [ |
|
|
|
|
|
Container( |
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
gradient: LinearGradient( |
|
|
|
|
|
begin: Alignment.topCenter, |
|
|
|
|
|
end: Alignment.bottomCenter, |
|
|
|
|
|
colors: [ |
|
|
|
|
|
Color.fromRGBO(248, 242, 255, 1), |
|
|
|
|
|
Color.fromRGBO(247, 247, 247, 1), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
|
|
|
Container( |
|
|
|
|
|
decoration: const BoxDecoration( |
|
|
|
|
|
gradient: LinearGradient( |
|
|
|
|
|
begin: Alignment.bottomCenter, |
|
|
|
|
|
end: Alignment.topCenter, |
|
|
|
|
|
colors: [ |
|
|
|
|
|
Color.fromRGBO(19, 16, 47, 1), |
|
|
|
|
|
Color.fromRGBO(19, 16, 47, 1), |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
Container( |
|
|
|
|
|
decoration: const BoxDecoration( |
|
|
|
|
|
gradient: LinearGradient( |
|
|
|
|
|
begin: Alignment.bottomCenter, |
|
|
|
|
|
end: Alignment.topCenter, |
|
|
|
|
|
colors: [ |
|
|
|
|
|
Color.fromRGBO(19, 16, 47, 1), |
|
|
|
|
|
Color.fromRGBO(19, 16, 47, 1), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
|
|
|
Container( |
|
|
|
|
|
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top), |
|
|
|
|
|
child: Column( |
|
|
|
|
|
children: [ |
|
|
|
|
|
Expanded( |
|
|
|
|
|
child: SingleChildScrollView( |
|
|
|
|
|
child: Column( |
|
|
|
|
|
children: [ |
|
|
|
|
|
SizedBox(height: 10.w), |
|
|
|
|
|
Obx(() { |
|
|
|
|
|
final detail = _roomController.rtcChannelDetail.value; |
|
|
|
|
|
final anchorInfo = detail?.anchorInfo; |
|
|
|
|
|
|
|
|
|
|
|
final userName = anchorInfo!.nickName; |
|
|
|
|
|
final avatarAsset = anchorInfo.profilePhoto; |
|
|
|
|
|
const popularityText = '0'; // TODO: 使用真实数据 |
|
|
|
|
|
|
|
|
|
|
|
return LiveRoomUserHeader( |
|
|
|
|
|
userName: userName, |
|
|
|
|
|
popularityText: popularityText, |
|
|
|
|
|
avatarAsset: avatarAsset, |
|
|
|
|
|
onCloseTap: () { |
|
|
|
|
|
Get.back(); |
|
|
|
|
|
_overlayController.toggle(); |
|
|
|
|
|
}, |
|
|
|
|
|
); |
|
|
|
|
|
}), |
|
|
|
|
|
SizedBox(height: 7.w), |
|
|
|
|
|
LiveRoomAnchorShowcase(), |
|
|
|
|
|
SizedBox(height: 5.w), |
|
|
|
|
|
const LiveRoomActiveSpeaker(), |
|
|
|
|
|
SizedBox(height: 9.w), |
|
|
|
|
|
const LiveRoomNoticeChatPanel(), |
|
|
|
|
|
SizedBox(height: 17.w), |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
Container( |
|
|
|
|
|
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top), |
|
|
|
|
|
child: Column( |
|
|
|
|
|
children: [ |
|
|
|
|
|
Expanded( |
|
|
|
|
|
child: SingleChildScrollView( |
|
|
|
|
|
child: Column( |
|
|
|
|
|
children: [ |
|
|
|
|
|
SizedBox(height: 10.w), |
|
|
|
|
|
Obx(() { |
|
|
|
|
|
final detail = _roomController.rtcChannelDetail.value; |
|
|
|
|
|
final anchorInfo = detail?.anchorInfo; |
|
|
|
|
|
|
|
|
|
|
|
final userName = anchorInfo!.nickName; |
|
|
|
|
|
final avatarAsset = anchorInfo.profilePhoto; |
|
|
|
|
|
const popularityText = '0'; // TODO: 使用真实数据 |
|
|
|
|
|
|
|
|
|
|
|
return LiveRoomUserHeader( |
|
|
|
|
|
userName: userName, |
|
|
|
|
|
popularityText: popularityText, |
|
|
|
|
|
avatarAsset: avatarAsset, |
|
|
|
|
|
onCloseTap: () { |
|
|
|
|
|
Get.back(); |
|
|
|
|
|
_overlayController.toggle(); |
|
|
|
|
|
}, |
|
|
|
|
|
); |
|
|
|
|
|
}), |
|
|
|
|
|
SizedBox(height: 7.w), |
|
|
|
|
|
LiveRoomAnchorShowcase(), |
|
|
|
|
|
SizedBox(height: 5.w), |
|
|
|
|
|
const LiveRoomActiveSpeaker(), |
|
|
|
|
|
SizedBox(height: 9.w), |
|
|
|
|
|
const LiveRoomNoticeChatPanel(), |
|
|
|
|
|
SizedBox(height: 17.w), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
|
|
|
LiveRoomActionBar( |
|
|
|
|
|
messageController: _messageController, |
|
|
|
|
|
onMessageChanged: (value) { |
|
|
|
|
|
message = value; |
|
|
|
|
|
}, |
|
|
|
|
|
onSendTap: _sendMessage, |
|
|
|
|
|
onGiftTap: _showGiftPopup, |
|
|
|
|
|
onChargeTap: _showRechargePopup, |
|
|
|
|
|
), |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
LiveRoomActionBar( |
|
|
|
|
|
messageController: _messageController, |
|
|
|
|
|
onMessageChanged: (value) { |
|
|
|
|
|
message = value; |
|
|
|
|
|
}, |
|
|
|
|
|
onSendTap: _sendMessage, |
|
|
|
|
|
onGiftTap: _showGiftPopup, |
|
|
|
|
|
onChargeTap: _showRechargePopup, |
|
|
|
|
|
), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
), |
|
|
), |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|