全员结束会议、被移除提示时间延迟
This commit is contained in:
parent
fc9f72b88e
commit
85a475b19b
|
|
@ -54,7 +54,6 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
state.meetingToken.value = res.data!;
|
state.meetingToken.value = res.data!;
|
||||||
|
|
||||||
if (isInit == true) {
|
if (isInit == true) {
|
||||||
initRtc();
|
|
||||||
signalRSocket();
|
signalRSocket();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -64,7 +63,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
/// 2.获取会议室所有用户
|
/// 2.获取会议室所有用户
|
||||||
Future<void> mergeFetch(bool isAgain) async {
|
Future<void> mergeFetch(bool isAgain) async {
|
||||||
try {
|
try {
|
||||||
if(isAgain == false){
|
if (isAgain == false) {
|
||||||
ToastUtils.showLoading();
|
ToastUtils.showLoading();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -105,6 +104,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
void getMeetingRoomAllUser(List<MeetingRoomUser> meetingRoomUsers) async {
|
void getMeetingRoomAllUser(List<MeetingRoomUser> meetingRoomUsers) async {
|
||||||
state.users.value = meetingRoomUsers;
|
state.users.value = meetingRoomUsers;
|
||||||
state.cacheUsers.value = meetingRoomUsers;
|
state.cacheUsers.value = meetingRoomUsers;
|
||||||
|
update();
|
||||||
doHttpGetTvAnchor();
|
doHttpGetTvAnchor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -328,7 +328,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
// 开始重新连接时回调
|
// 开始重新连接时回调
|
||||||
state.hubConnection.value?.onreconnecting((error) {
|
state.hubConnection.value?.onreconnecting((error) {
|
||||||
debugPrint("wgs输出===:SignalR Socket-重连$error");
|
debugPrint("wgs输出===:SignalR Socket-重连$error");
|
||||||
if(EasyLoading.isShow == false) {
|
if (EasyLoading.isShow == false) {
|
||||||
ToastUtils.showLoadingToMask("网络故障,正在重连...", EasyLoadingMaskType.black);
|
ToastUtils.showLoadingToMask("网络故障,正在重连...", EasyLoadingMaskType.black);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -338,24 +338,25 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
debugPrint("wgs输出===:SignalR Socket-重连成功$connectionId");
|
debugPrint("wgs输出===:SignalR Socket-重连成功$connectionId");
|
||||||
joinMeetingToSocket(true);
|
joinMeetingToSocket(true);
|
||||||
ToastUtils.dismiss();
|
ToastUtils.dismiss();
|
||||||
if(EasyLoading.isShow == false) {
|
if (EasyLoading.isShow == false) {
|
||||||
ToastUtils.showSuccessToMask("重连成功!", EasyLoadingMaskType.black);
|
ToastUtils.showSuccessToMask("重连成功!", EasyLoadingMaskType.black);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 重新连接失败时回调,5次重连都失败才回调
|
// 重新连接失败时回调,5次重连都失败才回调
|
||||||
state.hubConnection.value?.onclose((error){
|
state.hubConnection.value?.onclose((error) {
|
||||||
debugPrint("wgs输出===:SignalR Socket-重连失败$error");
|
debugPrint("wgs输出===:SignalR Socket-重连失败$error");
|
||||||
ToastUtils.dismiss();
|
ToastUtils.dismiss();
|
||||||
|
|
||||||
if(state.isNormaExit.value == false && state.isShowOkAlertDialog.value == false){
|
if (state.isNormaExit.value == false &&
|
||||||
|
state.isShowOkAlertDialog.value == false) {
|
||||||
showOkAlertDialog(
|
showOkAlertDialog(
|
||||||
context: Get.context!,
|
context: Get.context!,
|
||||||
title: "提示",
|
title: "提示",
|
||||||
message: "网络错误,请重新加入会议室",
|
message: "网络错误,请重新加入会议室",
|
||||||
okLabel: "确定",
|
okLabel: "确定",
|
||||||
barrierDismissible: false,
|
barrierDismissible: false,
|
||||||
).then((OkCancelResult value){
|
).then((OkCancelResult value) {
|
||||||
Get.back();
|
Get.back();
|
||||||
Get.back();
|
Get.back();
|
||||||
});
|
});
|
||||||
|
|
@ -428,6 +429,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
debugPrint("wgs输出===:Socket-关闭发言权限:观众");
|
debugPrint("wgs输出===:Socket-关闭发言权限:观众");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
update();
|
||||||
});
|
});
|
||||||
|
|
||||||
/// ------------------------------------------------------------------------------麦克风相关回调
|
/// ------------------------------------------------------------------------------麦克风相关回调
|
||||||
|
|
@ -443,6 +445,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
}
|
}
|
||||||
state.users.value = state.cacheUsers.value;
|
state.users.value = state.cacheUsers.value;
|
||||||
state.isOpenMicrophone.value = e?[0];
|
state.isOpenMicrophone.value = e?[0];
|
||||||
|
update();
|
||||||
});
|
});
|
||||||
|
|
||||||
/// 用户单独开闭麦回调
|
/// 用户单独开闭麦回调
|
||||||
|
|
@ -480,6 +483,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
muteLocalAudioStream(true);
|
muteLocalAudioStream(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
update();
|
||||||
});
|
});
|
||||||
|
|
||||||
/// ------------------------------------------------------------------------------会议室进出相关回调
|
/// ------------------------------------------------------------------------------会议室进出相关回调
|
||||||
|
|
@ -493,6 +497,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
.toList();
|
.toList();
|
||||||
state.cacheUsers.value.addAll(meetingRoomUsers);
|
state.cacheUsers.value.addAll(meetingRoomUsers);
|
||||||
state.users.value = state.cacheUsers.value;
|
state.users.value = state.cacheUsers.value;
|
||||||
|
update();
|
||||||
debugPrint("wgs输出===:Socket-远端用户或主播加入会议室:$jsonStr");
|
debugPrint("wgs输出===:Socket-远端用户或主播加入会议室:$jsonStr");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -509,6 +514,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
state.users.value = state.cacheUsers.value;
|
state.users.value = state.cacheUsers.value;
|
||||||
|
update();
|
||||||
doHttpGetTvAnchor();
|
doHttpGetTvAnchor();
|
||||||
debugPrint("wgs输出===:Socket-远端用户或主播离开会议室:$jsonStr");
|
debugPrint("wgs输出===:Socket-远端用户或主播离开会议室:$jsonStr");
|
||||||
});
|
});
|
||||||
|
|
@ -518,15 +524,21 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
// var jsonStr = const Utf8Decoder().convert(json.encode(e).runes.toList());
|
// var jsonStr = const Utf8Decoder().convert(json.encode(e).runes.toList());
|
||||||
var jsonStr = json.encode(e);
|
var jsonStr = json.encode(e);
|
||||||
debugPrint("wgs输出===:Socket-被移除会议:$jsonStr");
|
debugPrint("wgs输出===:Socket-被移除会议:$jsonStr");
|
||||||
Get.back();
|
state.isNormaExit.value = true;
|
||||||
ToastUtils.showSuccess("你已被移除会议");
|
ToastUtils.showSuccess("你已被移除会议");
|
||||||
|
Future.delayed(const Duration(seconds: 1), () {
|
||||||
|
Get.back();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/// 全员结束会议回调
|
/// 全员结束会议回调
|
||||||
state.hubConnection.value?.on("AllLeave", (e) {
|
state.hubConnection.value?.on("AllLeave", (e) {
|
||||||
debugPrint("wgs输出===:Socket-全员结束会议");
|
debugPrint("wgs输出===:Socket-全员结束会议");
|
||||||
Get.back();
|
state.isNormaExit.value = true;
|
||||||
ToastUtils.showSuccess("会议已结束");
|
ToastUtils.showSuccess("会议已结束");
|
||||||
|
Future.delayed(const Duration(seconds: 1), () {
|
||||||
|
Get.back();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/// ------------------------------------------------------------------------------会议室聊天相关回调
|
/// ------------------------------------------------------------------------------会议室聊天相关回调
|
||||||
|
|
@ -607,6 +619,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
update();
|
||||||
});
|
});
|
||||||
|
|
||||||
/// 设置新的全员观看视频主播回调
|
/// 设置新的全员观看视频主播回调
|
||||||
|
|
@ -620,10 +633,15 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 加入会议室
|
/// 加入会议室
|
||||||
|
/// isAgain:是否重新加入
|
||||||
Future<void> joinMeetingToSocket(bool isAgain) async {
|
Future<void> joinMeetingToSocket(bool isAgain) async {
|
||||||
await state.hubConnection.value?.invoke("joinChannel",
|
await state.hubConnection.value?.invoke("joinChannel",
|
||||||
args: [state.roomNumber.value, false, false, false]);
|
args: [state.roomNumber.value, false, false, false]);
|
||||||
mergeFetch(isAgain);
|
if(isAgain == false){
|
||||||
|
initRtc(false);
|
||||||
|
}else{
|
||||||
|
mergeFetch(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 离开会议室
|
/// 离开会议室
|
||||||
|
|
@ -654,7 +672,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
|
|
||||||
/// ------------------------------------------------------------------------------声网SDK相关
|
/// ------------------------------------------------------------------------------声网SDK相关
|
||||||
/// 初始化声网SDK
|
/// 初始化声网SDK
|
||||||
Future<void> initRtc() async {
|
Future<void> initRtc(bool isAgain) async {
|
||||||
// 请求麦克风、摄像头权限
|
// 请求麦克风、摄像头权限
|
||||||
PermissionService.requestPermissions();
|
PermissionService.requestPermissions();
|
||||||
|
|
||||||
|
|
@ -687,6 +705,8 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
RtcEngineEventHandler(
|
RtcEngineEventHandler(
|
||||||
// 成功加入会议室回调
|
// 成功加入会议室回调
|
||||||
onJoinChannelSuccess: (RtcConnection connection, int elapsed) {
|
onJoinChannelSuccess: (RtcConnection connection, int elapsed) {
|
||||||
|
state.isJoinSuccess.value = true;
|
||||||
|
mergeFetch(isAgain);
|
||||||
debugPrint("wgs输出===:RTC-自己加入会议室,ID:${connection.localUid}");
|
debugPrint("wgs输出===:RTC-自己加入会议室,ID:${connection.localUid}");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -712,6 +732,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
update();
|
||||||
debugPrint("wgs输出===:RTC-远端用户或主播离开会议室,用户或主机的ID:$remoteUid");
|
debugPrint("wgs输出===:RTC-远端用户或主播离开会议室,用户或主机的ID:$remoteUid");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -813,32 +834,37 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
|
|
||||||
// 网络连接状态回调
|
// 网络连接状态回调
|
||||||
onConnectionStateChanged: (RtcConnection connection,
|
onConnectionStateChanged: (RtcConnection connection,
|
||||||
ConnectionStateType stateType, ConnectionChangedReasonType reason) {
|
ConnectionStateType stateType,
|
||||||
|
ConnectionChangedReasonType reason) {
|
||||||
debugPrint("wgs输出===:RTC-网络连接状态发生改变:"
|
debugPrint("wgs输出===:RTC-网络连接状态发生改变:"
|
||||||
"会议室编号(${connection.channelId}),"
|
"会议室编号(${connection.channelId}),"
|
||||||
"网络状态($stateType-${AgoraUtil.getConnectionStateChangedType(stateType)}),"
|
"网络状态($stateType-${AgoraUtil.getConnectionStateChangedType(stateType)}),"
|
||||||
"网络改变原因($reason-${AgoraUtil.getConnectionChangedReasonType(reason)})");
|
"网络改变原因($reason-${AgoraUtil.getConnectionChangedReasonType(reason)})");
|
||||||
if(stateType == ConnectionStateType.connectionStateReconnecting){
|
if (stateType == ConnectionStateType.connectionStateReconnecting) {
|
||||||
if(EasyLoading.isShow == false){
|
if (EasyLoading.isShow == false) {
|
||||||
ToastUtils.showLoadingToMask("网络故障,正在重连...", EasyLoadingMaskType.black);
|
ToastUtils.showLoadingToMask(
|
||||||
|
"网络故障,正在重连...", EasyLoadingMaskType.black);
|
||||||
}
|
}
|
||||||
}else if(stateType == ConnectionStateType.connectionStateConnected && reason == ConnectionChangedReasonType.connectionChangedRejoinSuccess){
|
} else if (stateType == ConnectionStateType.connectionStateConnected &&
|
||||||
|
reason ==
|
||||||
|
ConnectionChangedReasonType.connectionChangedRejoinSuccess) {
|
||||||
ToastUtils.dismiss();
|
ToastUtils.dismiss();
|
||||||
if(EasyLoading.isShow == false){
|
if (EasyLoading.isShow == false) {
|
||||||
ToastUtils.showSuccessToMask("重连成功!", EasyLoadingMaskType.black);
|
ToastUtils.showSuccessToMask("重连成功!", EasyLoadingMaskType.black);
|
||||||
}
|
}
|
||||||
}else if(reason == ConnectionChangedReasonType.connectionChangedLost){
|
} else if (reason ==
|
||||||
|
ConnectionChangedReasonType.connectionChangedLost) {
|
||||||
// 和服务器失去连接后,再延迟15秒(和signalR Socket一致),让SDK继续重连,如果重连不上则告知用户需要重新加入
|
// 和服务器失去连接后,再延迟15秒(和signalR Socket一致),让SDK继续重连,如果重连不上则告知用户需要重新加入
|
||||||
Future.delayed(const Duration(milliseconds: 15000), () {
|
Future.delayed(const Duration(milliseconds: 15000), () {
|
||||||
ToastUtils.dismiss();
|
ToastUtils.dismiss();
|
||||||
if(state.isShowOkAlertDialog.value == false){
|
if (state.isShowOkAlertDialog.value == false) {
|
||||||
showOkAlertDialog(
|
showOkAlertDialog(
|
||||||
context: Get.context!,
|
context: Get.context!,
|
||||||
title: "提示",
|
title: "提示",
|
||||||
message: "网络错误,请重新加入会议室",
|
message: "网络错误,请重新加入会议室",
|
||||||
okLabel: "确定",
|
okLabel: "确定",
|
||||||
barrierDismissible: false,
|
barrierDismissible: false,
|
||||||
).then((OkCancelResult value){
|
).then((OkCancelResult value) {
|
||||||
Get.back();
|
Get.back();
|
||||||
Get.back();
|
Get.back();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ class MeetingMainState {
|
||||||
late Rx<MeetingRoomInfo?> meetingRoomInfo = Rx(null);
|
late Rx<MeetingRoomInfo?> meetingRoomInfo = Rx(null);
|
||||||
/// 是否弹出showOkAlertDialog
|
/// 是否弹出showOkAlertDialog
|
||||||
late RxBool isShowOkAlertDialog = false.obs;
|
late RxBool isShowOkAlertDialog = false.obs;
|
||||||
/// 是否正常退出(点击仅自己退出)
|
/// 是否正常退出(点击仅自己退出、全员结束、被移除)
|
||||||
late RxBool isNormaExit = false.obs;
|
late RxBool isNormaExit = false.obs;
|
||||||
|
|
||||||
/// 会议室计时相关
|
/// 会议室计时相关
|
||||||
|
|
@ -76,6 +76,8 @@ class MeetingMainState {
|
||||||
late RxBool isOpenShare = false.obs;
|
late RxBool isOpenShare = false.obs;
|
||||||
/// 当前视频主播ID
|
/// 当前视频主播ID
|
||||||
late RxString remoteUid = "".obs;
|
late RxString remoteUid = "".obs;
|
||||||
|
/// 是否成功加入会议室
|
||||||
|
late RxBool isJoinSuccess = false.obs;
|
||||||
|
|
||||||
/// 当前谁在说话
|
/// 当前谁在说话
|
||||||
late RxString spokesman = "".obs;
|
late RxString spokesman = "".obs;
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@ class MeetingMainPageState extends State<MeetingMainPage> {
|
||||||
// 视频-共享
|
// 视频-共享
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: state.pageState.value == 1,
|
visible: state.pageState.value == 1,
|
||||||
child: null != state.rctEngine.value
|
child: state.isJoinSuccess.value == true && null != state.rctEngine.value && null != state.users.value && state.users.value.isNotEmpty
|
||||||
? Stack(
|
? Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -275,7 +275,9 @@ class MeetingMainPageState extends State<MeetingMainPage> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: Container()),
|
: Container(
|
||||||
|
child: Text('加载反馈:是否成功加入会议室${state.isJoinSuccess.value}-会议室对象${state.rctEngine.value}-成员列表${state.users.value.length}-全员观看ID${state.remoteUid.value}'),
|
||||||
|
)),
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
|
@ -1634,147 +1636,149 @@ class MeetingMainPageState extends State<MeetingMainPage> {
|
||||||
);
|
);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// gridview
|
/// gridview
|
||||||
pageList.add(Container(
|
pageList.add(GetBuilder<MeetingMainLogic>(builder: (controll){
|
||||||
color: ColorUtil.Color_57_57_57,
|
return Container(
|
||||||
child: GridView.builder(
|
color: ColorUtil.Color_57_57_57,
|
||||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
child: GridView.builder(
|
||||||
crossAxisCount: 2, childAspectRatio: 0.8, crossAxisSpacing: 0),
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
itemCount: state.cacheUsers.value.length,
|
crossAxisCount: 2, childAspectRatio: 0.8, crossAxisSpacing: 0),
|
||||||
itemBuilder: (BuildContext ctx, index) {
|
itemCount: state.cacheUsers.value.length,
|
||||||
return Stack(
|
itemBuilder: (BuildContext ctx, index) {
|
||||||
children: [
|
return Stack(
|
||||||
state.cacheUsers.value[index].enableCamera == true
|
children: [
|
||||||
? state.cacheUsers.value[index].uid ==
|
state.cacheUsers.value[index].enableCamera == true
|
||||||
UserStore.to.userInfoEntity.value!.uid
|
? state.cacheUsers.value[index].uid == UserStore.to.userInfoEntity.value!.uid
|
||||||
? AgoraVideoView(
|
? AgoraVideoView(
|
||||||
controller: VideoViewController(
|
controller: VideoViewController(
|
||||||
rtcEngine: state.rctEngine.value!,
|
rtcEngine: state.rctEngine.value!,
|
||||||
canvas: const VideoCanvas(
|
canvas: const VideoCanvas(
|
||||||
uid: 0,
|
uid: 0,
|
||||||
setupMode:
|
setupMode:
|
||||||
VideoViewSetupMode.videoViewSetupAdd)),
|
VideoViewSetupMode.videoViewSetupAdd)),
|
||||||
|
)
|
||||||
|
: AgoraVideoView(
|
||||||
|
controller: VideoViewController.remote(
|
||||||
|
rtcEngine: state.rctEngine.value!,
|
||||||
|
canvas: VideoCanvas(
|
||||||
|
uid: int.tryParse(
|
||||||
|
state.cacheUsers.value[index].uid),
|
||||||
|
setupMode:
|
||||||
|
VideoViewSetupMode.videoViewSetupAdd),
|
||||||
|
connection: RtcConnection(
|
||||||
|
channelId: state.roomNumber.value),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Container(
|
||||||
|
color: ColorUtil.Color_16_19_13,
|
||||||
|
child: SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/metting_main_no_person.png',
|
||||||
|
width: 78.w,
|
||||||
|
height: 84.h,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
Text(
|
||||||
|
'该用户未开启摄像头...',
|
||||||
|
style: TextStyle(
|
||||||
|
color: ColorUtil.Color_255_255_255,
|
||||||
|
fontSize: 10.sp),
|
||||||
)
|
)
|
||||||
: AgoraVideoView(
|
],
|
||||||
controller: VideoViewController.remote(
|
),
|
||||||
rtcEngine: state.rctEngine.value!,
|
),
|
||||||
canvas: VideoCanvas(
|
),
|
||||||
uid: int.tryParse(
|
Positioned(
|
||||||
state.cacheUsers.value[index].uid),
|
left: 4,
|
||||||
setupMode:
|
bottom: 4,
|
||||||
VideoViewSetupMode.videoViewSetupAdd),
|
child: Row(
|
||||||
connection: RtcConnection(
|
children: [
|
||||||
channelId: state.roomNumber.value),
|
Visibility(
|
||||||
),
|
visible: state.cacheUsers.value[index].uid ==
|
||||||
)
|
UserStore.to.userInfoEntity.value!.uid,
|
||||||
: Container(
|
child: Image.asset(
|
||||||
color: ColorUtil.Color_16_19_13,
|
'assets/images/meeting_main_own.png',
|
||||||
child: SizedBox(
|
width: 24.w,
|
||||||
width: double.infinity,
|
height: 24.h,
|
||||||
child: Column(
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 20,
|
||||||
|
margin: const EdgeInsets.only(left: 4),
|
||||||
|
padding: const EdgeInsets.only(left: 4, right: 4),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(2),
|
||||||
|
color: ColorUtil.Color_0_0_0_96),
|
||||||
|
child: state.cacheUsers.value[index].enableMicr == true
|
||||||
|
? Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 20.w,
|
||||||
|
height: 20.h,
|
||||||
|
child: LiquidCustomProgressIndicator(
|
||||||
|
value: state.cacheUsers.value[index]
|
||||||
|
.volume ??
|
||||||
|
0.0,
|
||||||
|
valueColor:
|
||||||
|
const AlwaysStoppedAnimation(
|
||||||
|
ColorUtil.Color_2_177_136),
|
||||||
|
backgroundColor:
|
||||||
|
ColorUtil.Color_255_255_255,
|
||||||
|
direction: Axis.vertical,
|
||||||
|
shapePath:
|
||||||
|
ViewSvgPath.getMicrpphonePath()),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 70,
|
||||||
|
child: Text(
|
||||||
|
state.cacheUsers.value[index].userName,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12.sp,
|
||||||
|
color: ColorUtil.Color_255_255_255),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/metting_main_no_person.png',
|
'assets/images/meeting_main_microphone_open.png',
|
||||||
width: 78.w,
|
width: 20.w,
|
||||||
height: 84.h,
|
height: 20.h,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
SizedBox(
|
||||||
Text(
|
width: 70,
|
||||||
'该用户未开启摄像头...',
|
child: Text(
|
||||||
style: TextStyle(
|
state.cacheUsers.value[index].userName,
|
||||||
color: ColorUtil.Color_255_255_255,
|
maxLines: 1,
|
||||||
fontSize: 10.sp),
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12.sp,
|
||||||
|
color: ColorUtil.Color_255_255_255),
|
||||||
|
)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
)
|
||||||
),
|
],
|
||||||
Positioned(
|
),
|
||||||
left: 4,
|
)
|
||||||
bottom: 4,
|
],
|
||||||
child: Row(
|
);
|
||||||
children: [
|
}),
|
||||||
Visibility(
|
);
|
||||||
visible: state.cacheUsers.value[index].uid ==
|
}));
|
||||||
UserStore.to.userInfoEntity.value!.uid,
|
|
||||||
child: Image.asset(
|
|
||||||
'assets/images/meeting_main_own.png',
|
|
||||||
width: 24.w,
|
|
||||||
height: 24.h,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 20,
|
|
||||||
margin: const EdgeInsets.only(left: 4),
|
|
||||||
padding: const EdgeInsets.only(left: 4, right: 4),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(2),
|
|
||||||
color: ColorUtil.Color_0_0_0_96),
|
|
||||||
child: state.cacheUsers.value[index].enableMicr == true
|
|
||||||
? Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
width: 20.w,
|
|
||||||
height: 20.h,
|
|
||||||
child: LiquidCustomProgressIndicator(
|
|
||||||
value: state.cacheUsers.value[index]
|
|
||||||
.volume ??
|
|
||||||
0.0,
|
|
||||||
valueColor:
|
|
||||||
const AlwaysStoppedAnimation(
|
|
||||||
ColorUtil.Color_2_177_136),
|
|
||||||
backgroundColor:
|
|
||||||
ColorUtil.Color_255_255_255,
|
|
||||||
direction: Axis.vertical,
|
|
||||||
shapePath:
|
|
||||||
ViewSvgPath.getMicrpphonePath()),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 70,
|
|
||||||
child: Text(
|
|
||||||
state.cacheUsers.value[index].userName,
|
|
||||||
maxLines: 1,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: ColorUtil.Color_255_255_255),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
],
|
|
||||||
)
|
|
||||||
: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/meeting_main_microphone_open.png',
|
|
||||||
width: 20.w,
|
|
||||||
height: 20.h,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 70,
|
|
||||||
child: Text(
|
|
||||||
state.cacheUsers.value[index].userName,
|
|
||||||
maxLines: 1,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: ColorUtil.Color_255_255_255),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
));
|
|
||||||
return pageList[position];
|
return pageList[position];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue