WGShare.Mobile.Flutter/wgshare/lib/pages/metting/meeting_main_state.dart

84 lines
2.6 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'dart:async';
import 'package:agora_rtc_engine/agora_rtc_engine.dart';
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
import 'package:get/get_rx/src/rx_types/rx_types.dart';
import 'package:signalr_core/signalr_core.dart';
import '../../common/models/meeting_room_info.dart';
import '../../common/models/meeting_room_msg.dart';
import '../../common/models/meeting_room_user.dart';
class MeetingMainState {
MeetingMainState() {
///Initialize variables
}
late TextEditingController memberNameSearchController = TextEditingController();
late TextEditingController sendMsgController = TextEditingController();
/// 是否显示会议信息浮层
late RxBool isShowMeetingInfoFloatingLayer = false.obs;
/// 是否显示音频选择浮层
late RxBool isShowMeetingAudioFloatingLayer = false.obs;
/// 聊天弹窗中Listview控制器
late ScrollController chatController = ScrollController();
/// 当前页面状态0语音1视频2共享
late RxInt pageState = 0.obs;
/// 会议室编号
late RxString roomNumber = "".obs;
/// 会议室token
late RxString meetingToken = "".obs;
/// 会议室信息
late Rx<MeetingRoomInfo?> meetingRoomInfo = Rx(null);
/// 会议室计时相关
late RxString duration = "".obs;
late Rx<Stopwatch> stopwatch = Rx(Stopwatch());
late Rx<Timer?> timer = Rx(null);
/// Http接口获取的会议室所有用户
late RxList<MeetingRoomUser> users = RxList([]);
/// 搜索用户时,缓存会议室所有用户原始数据
late RxList<MeetingRoomUser> cacheUsers = RxList([]);
/// 是否被允许发言
late RxBool isSpeak = false.obs;
/// 是否打开麦克风
late RxBool isOpenMicrophone = false.obs;
/// 麦克风音量
late RxDouble microphoneVolume = 0.0.obs;
/// 是否打开摄像头
late RxBool isOpenCamera = false.obs;
/// 聊天数据
late RxList<MeetingRoomMsg> meetingRoomMsgs = RxList([]);
/// signalR 长连接相关
late RxString serviceUrl = "http://192.168.2.9:5192/session-manage".obs;
late Rx<HubConnection?> hubConnection = Rx(null);
/// 声网相关
final String appId = "4a4f7be64fa1404ebda74784fe9ac381";
late Rx<RtcEngine?> rctEngine = Rx(null);
/// 是否自动订阅所有视频流
late RxBool isAutoSubscribeVideo = false.obs;
/// 是否自动订阅所有音频流
late RxBool isAutoSubscribeAudio = false.obs;
/// 是否发布摄像头采集的视频
late RxBool isPublishCameraTrack = false.obs;
/// 是否发布麦克风采集的音频
late RxBool isPublishMicrophoneTrack = false.obs;
/// 当前音频路由1听筒3扬声器
late RxInt communicationMode = 1.obs;
}