|
|
|
@ -197,99 +197,97 @@ class _LiveRoomAnchorShowcaseState extends State<LiveRoomAnchorShowcase> { |
|
|
|
child: SizedBox( |
|
|
|
width: 177.w, |
|
|
|
height: 175.w, |
|
|
|
child: userInfo != null && userInfo.uid != null && joined && engine != null ? AgoraVideoView( |
|
|
|
controller: isCurrentUser |
|
|
|
? VideoViewController( |
|
|
|
rtcEngine: engine, |
|
|
|
canvas: const VideoCanvas(uid: 0), |
|
|
|
) |
|
|
|
: VideoViewController.remote( |
|
|
|
rtcEngine: engine, |
|
|
|
canvas: VideoCanvas(uid: userInfo.uid!), |
|
|
|
connection: RtcConnection( |
|
|
|
channelId: _rtcManager.currentChannelId ?? '', |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
: Stack( |
|
|
|
children: [ |
|
|
|
Image.asset(isLeft ? Assets.imagesMaleEmpty : Assets.imagesFemaleEmpty), |
|
|
|
userInfo != null ? Positioned( |
|
|
|
top: 5.w, |
|
|
|
right: 5.w, |
|
|
|
child: Container( |
|
|
|
child: userInfo != null && userInfo.uid != null && joined && engine != null ? Stack( |
|
|
|
children: [ |
|
|
|
Positioned( |
|
|
|
top: 5.w, |
|
|
|
right: 5.w, |
|
|
|
child: Container( |
|
|
|
width: 20.w, |
|
|
|
height: 20.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(20.w)), |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: Image.asset( |
|
|
|
Assets.imagesGiftIcon, |
|
|
|
width: 19.w, |
|
|
|
height: 19.w, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Positioned( |
|
|
|
bottom: 5.w, |
|
|
|
right: 5.w, |
|
|
|
child: Container( |
|
|
|
width: 47.w, |
|
|
|
height: 20.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(20.w)), |
|
|
|
color: Colors.white, |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: Text( |
|
|
|
"加好友", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 11.w, |
|
|
|
color: const Color.fromRGBO(117, 98, 249, 1), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Positioned( |
|
|
|
left: 5.w, |
|
|
|
bottom: 5.w, |
|
|
|
child: Row( |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
width: 20.w, |
|
|
|
height: 20.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(20.w)), |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(4.w)), |
|
|
|
color: const Color.fromRGBO(0, 0, 0, .65), |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: Image.asset( |
|
|
|
Assets.imagesGiftIcon, |
|
|
|
width: 19.w, |
|
|
|
height: 19.w, |
|
|
|
userInfo.isMicrophoneOn |
|
|
|
? Assets.imagesMicOpen |
|
|
|
: Assets.imagesMicClose, |
|
|
|
width: 10.w, |
|
|
|
height: 11.w, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
) : const SizedBox(), |
|
|
|
userInfo != null ? Positioned( |
|
|
|
bottom: 5.w, |
|
|
|
right: 5.w, |
|
|
|
child: Container( |
|
|
|
width: 47.w, |
|
|
|
height: 20.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(20.w)), |
|
|
|
SizedBox(width: 5.w), |
|
|
|
Text( |
|
|
|
userInfo.nickName, |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 11.w, |
|
|
|
color: Colors.white, |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: Text( |
|
|
|
"加好友", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 11.w, |
|
|
|
color: const Color.fromRGBO(117, 98, 249, 1), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
) : const SizedBox(), |
|
|
|
if (userInfo != null) |
|
|
|
Positioned( |
|
|
|
left: 5.w, |
|
|
|
bottom: 5.w, |
|
|
|
child: Row( |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
width: 20.w, |
|
|
|
height: 20.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(4.w)), |
|
|
|
color: const Color.fromRGBO(0, 0, 0, .65), |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: Image.asset( |
|
|
|
userInfo.isMicrophoneOn |
|
|
|
? Assets.imagesMicOpen |
|
|
|
: Assets.imagesMicClose, |
|
|
|
width: 10.w, |
|
|
|
height: 11.w, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(width: 5.w), |
|
|
|
Text( |
|
|
|
userInfo.nickName, |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 11.w, |
|
|
|
color: Colors.white, |
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
AgoraVideoView( |
|
|
|
controller: isCurrentUser |
|
|
|
? VideoViewController( |
|
|
|
rtcEngine: engine, |
|
|
|
canvas: const VideoCanvas(uid: 0), |
|
|
|
) |
|
|
|
: VideoViewController.remote( |
|
|
|
rtcEngine: engine, |
|
|
|
canvas: VideoCanvas(uid: userInfo.uid!), |
|
|
|
connection: RtcConnection( |
|
|
|
channelId: _rtcManager.currentChannelId ?? '', |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
) : Image.asset(isLeft ? Assets.imagesMaleEmpty : Assets.imagesFemaleEmpty), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
|