Compare commits

..

No commits in common. "8df34b0fa7c5a1ea88afff85bfe199f4c17fcc49" and "bb41882757b9852c2926b2904d3bbdeb75fb0a63" have entirely different histories.

31 changed files with 705 additions and 1312 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 929 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 B

View File

@ -42,12 +42,6 @@ abstract class RetrofitClient {
@Path("roomNum") String roomNum, @Path("roomNum") String roomNum,
); );
///
@GET("/room/checkout")
Future<BaseStructureResult<bool>> checkout(
@Query("roomNum") String roomNum,
);
/// ///
@GET("/room/user") @GET("/room/user")
Future<BaseStructureResult<List<MeetingRoomUser>>> getMeetingRoomAllUser( Future<BaseStructureResult<List<MeetingRoomUser>>> getMeetingRoomAllUser(

View File

@ -21,9 +21,4 @@ class AppConfig {
static const paddingLeft = 20.0; static const paddingLeft = 20.0;
static const paddingRight = 20.0; static const paddingRight = 20.0;
static const paddingbottom = 20.0; static const paddingbottom = 20.0;
//
static const NORMAL_LOGIN = "normal_login";
//
static const ANONYMOUS_LOGIN = "anonymous_login";
} }

View File

@ -14,9 +14,7 @@ class MeetingRoomMsg extends Object{
// 01 // 01
int source; int source;
String time; MeetingRoomMsg(this.uid,this.userName,this.message,this.source);
MeetingRoomMsg(this.uid,this.userName,this.message,this.source,this.time);
factory MeetingRoomMsg.fromJson(Map<String, dynamic> srcJson) => _$MeetingRoomMsgFromJson(srcJson); factory MeetingRoomMsg.fromJson(Map<String, dynamic> srcJson) => _$MeetingRoomMsgFromJson(srcJson);

View File

@ -39,10 +39,7 @@ class MeetingRoomUser extends Object{
@JsonKey(name: 'volume') @JsonKey(name: 'volume')
double? volume = 0.0; double? volume = 0.0;
@JsonKey(name: 'enableShare') MeetingRoomUser(this.uid,this.connectId,this.account,this.enableMicr,this.enableCamera,this.screenShareId,this.userName,this.roleId,this.roleName,this.isRoomManager,this.volume);
bool? enableShare = false;
MeetingRoomUser(this.uid,this.connectId,this.account,this.enableMicr,this.enableCamera,this.screenShareId,this.userName,this.roleId,this.roleName,this.isRoomManager,this.volume,this.enableShare);
factory MeetingRoomUser.fromJson(Map<String, dynamic> srcJson) => _$MeetingRoomUserFromJson(srcJson); factory MeetingRoomUser.fromJson(Map<String, dynamic> srcJson) => _$MeetingRoomUserFromJson(srcJson);

View File

@ -4,8 +4,7 @@ enum AppStorageKey {
token(value: 'TOKEN', label: "登录用户的token"), token(value: 'TOKEN', label: "登录用户的token"),
userInfo(value: 'USERINFO', label: "登录用户的基本信息"), userInfo(value: 'USERINFO', label: "登录用户的基本信息"),
account(value: 'ACCOUNT', label: "用户名"), account(value: 'ACCOUNT', label: "用户名"),
pwd(value: 'PWD', label: "密码"), pwd(value: 'PWD', label: "密码");
loginType(value: 'LOGINTYPE', label: "登录类型");
final String label; final String label;
final String value; final String value;

View File

@ -14,14 +14,10 @@ class UserStore extends GetxController with RequestToolMixin {
/// ///
String? token; String? token;
///
String? loginType;
/// ///
Rx<UserInfoEntity?> userInfoEntity = Rx(null); Rx<UserInfoEntity?> userInfoEntity = Rx(null);
UserStore init() { UserStore init() {
loginType = StorageService.to.read(AppStorageKey.loginType.value);
token = StorageService.to.read(AppStorageKey.token.value); token = StorageService.to.read(AppStorageKey.token.value);
try { try {
var userDetail = StorageService.to.read(AppStorageKey.userInfo.value); var userDetail = StorageService.to.read(AppStorageKey.userInfo.value);
@ -45,12 +41,6 @@ class UserStore extends GetxController with RequestToolMixin {
StorageService.to.write(AppStorageKey.token.value, token); StorageService.to.write(AppStorageKey.token.value, token);
} }
///
void setLoginType(String loginType) {
this.loginType = loginType;
StorageService.to.write(AppStorageKey.loginType.value, loginType);
}
/// ///
void setUserDetailInfo(UserInfoEntity info) { void setUserDetailInfo(UserInfoEntity info) {
userInfoEntity.value = info; userInfoEntity.value = info;
@ -61,7 +51,6 @@ class UserStore extends GetxController with RequestToolMixin {
void erase() { void erase() {
userInfoEntity.value = null; userInfoEntity.value = null;
token = null; token = null;
loginType = null;
StorageService.to.erase(); StorageService.to.erase();
} }

View File

@ -10,7 +10,6 @@ import 'package:wgshare/utils/package_info_util.dart';
import 'package:wgshare/utils/storage.dart'; import 'package:wgshare/utils/storage.dart';
import 'package:wgshare/utils/utils.dart'; import 'package:wgshare/utils/utils.dart';
import 'common/config/app_config.dart';
import 'common/config/colorUtils.dart'; import 'common/config/colorUtils.dart';
import 'routes/app_pages.dart'; import 'routes/app_pages.dart';
import 'routes/app_routes.dart'; import 'routes/app_routes.dart';
@ -80,9 +79,7 @@ class MyApp extends StatelessWidget {
// //
defaultTransition: Transition.fade, defaultTransition: Transition.fade,
// //
initialRoute: (UserStore.to.token?.isNotEmpty ?? false) && UserStore.to.userInfoEntity.value != null && UserStore.to.loginType != null && UserStore.to.loginType == AppConfig.NORMAL_LOGIN initialRoute: (UserStore.to.token?.isNotEmpty ?? false) && UserStore.to.userInfoEntity.value != null ? Routes.startPage : Routes.loginPage,
? Routes.startPage
: Routes.loginPage,
/// ///
getPages: AppPages.pages, getPages: AppPages.pages,

View File

@ -1,12 +1,9 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:signalr_core/signalr_core.dart'; import 'package:signalr_core/signalr_core.dart';
import 'package:wgshare/common/models/common/base_structure_result.dart'; import 'package:wgshare/common/models/common/base_structure_result.dart';
import 'package:wgshare/common/mixins/request_tool_mixin.dart'; import 'package:wgshare/common/mixins/request_tool_mixin.dart';
import 'package:wgshare/common/store/user_store.dart';
import '../../common/models/meeting_room_item.dart'; import '../../common/models/meeting_room_item.dart';
import '../../utils/toast_utils.dart';
import 'home_state.dart'; import 'home_state.dart';
class HomeLogic extends GetxController with RequestToolMixin { class HomeLogic extends GetxController with RequestToolMixin {
@ -25,9 +22,8 @@ class HomeLogic extends GetxController with RequestToolMixin {
state.refreshController.dispose(); state.refreshController.dispose();
} }
/// ///
Future<void> doHttpGetMeetingRoomList(int pageIndex, int pageSize) async { Future<void> doHttpGetMeetingRoomList(int pageIndex, int pageSize) async {
debugPrint("wgs输出===token${UserStore.to.token}");
BaseStructureResult<MeetingRoomItem> res = await getClient().getMeetingRoomList(pageIndex,pageSize); BaseStructureResult<MeetingRoomItem> res = await getClient().getMeetingRoomList(pageIndex,pageSize);
if(null != res.data){ if(null != res.data){
if(state.pageIndex == 1){ if(state.pageIndex == 1){
@ -58,20 +54,4 @@ class HomeLogic extends GetxController with RequestToolMixin {
doHttpGetMeetingRoomList(state.pageIndex.value,state.pageSize.value); doHttpGetMeetingRoomList(state.pageIndex.value,state.pageSize.value);
} }
/// 退
bool closeOnConfirm(BuildContext context) {
DateTime now = DateTime.now();
// 4, 退
if (state.currentBackPressTime == null ||
now.difference(state.currentBackPressTime!) > const Duration(seconds: 4)) {
state.currentBackPressTime = now;
ToastUtils.showInfo("再按一次退出");
return false;
}
// 退
state.currentBackPressTime = null;
return true;
}
} }

View File

@ -25,7 +25,4 @@ class HomeState {
/// ///
final RxInt totalPage = 0.obs; final RxInt totalPage = 0.obs;
/// 退
DateTime? currentBackPressTime;
} }

View File

@ -19,6 +19,7 @@ class HomePage extends StatefulWidget {
} }
class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin { class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
final logic = Get.put(HomeLogic()); final logic = Get.put(HomeLogic());
final state = Get.find<HomeLogic>().state; final state = Get.find<HomeLogic>().state;
@ -35,18 +36,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context); super.build(context);
return PopScope( return Scaffold(
canPop: false,
onPopInvoked: (bool didPop) async {
if (didPop) {
return;
}
if (logic.closeOnConfirm(context)) {
// 退
SystemNavigator.pop();
}
},
child: Scaffold(
appBar: AppBar( appBar: AppBar(
surfaceTintColor: Colors.white, surfaceTintColor: Colors.white,
elevation: 0, elevation: 0,
@ -72,7 +62,8 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
style: TextStyle( style: TextStyle(
fontSize: 16.sp, fontSize: 16.sp,
color: ColorUtil.Color_51_51_51, color: ColorUtil.Color_51_51_51,
fontWeight: FontWeight.w500), fontWeight: FontWeight.w500
),
), ),
), ),
Expanded( Expanded(
@ -88,28 +79,23 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
return Container( return Container(
width: double.infinity, width: double.infinity,
decoration: const BoxDecoration( decoration: const BoxDecoration(
borderRadius: borderRadius: BorderRadius.all(Radius.circular(6)),
BorderRadius.all(Radius.circular(6)),
color: Colors.white, color: Colors.white,
), ),
margin: EdgeInsets.only( margin: EdgeInsets.only(top: index == 0 ? 20 : 12, bottom: index == 19 ? 20 : 0, left: 16, right: 16),
top: index == 0 ? 20 : 12,
bottom: index == 19 ? 20 : 0,
left: 16,
right: 16),
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
child: Column( child: Column(
children: [ children: [
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Text(
state.meetingRooms.value[index].roomName, state.meetingRooms.value[index].roomName,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
color: ColorUtil.Color_89_88_88, color: ColorUtil.Color_89_88_88,
fontWeight: FontWeight.w500), fontWeight: FontWeight.w500
),
), ),
Row( Row(
children: [ children: [
@ -131,14 +117,12 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
), ),
SizedBox(height: 20.h), SizedBox(height: 20.h),
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
Text( Text(
state.meetingRooms.value[index] state.meetingRooms.value[index].roomNum,
.roomNum,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: ColorUtil.Color_177_177_177, color: ColorUtil.Color_177_177_177,
@ -151,10 +135,8 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
width: 16.w, width: 16.w,
height: 16.h, height: 16.h,
), ),
onTap: () { onTap: (){
Clipboard.setData(ClipboardData( Clipboard.setData(ClipboardData(text: state.meetingRooms.value[index].roomNum));
text: state.meetingRooms
.value[index].roomNum));
ToastUtils.showSuccess("复制成功"); ToastUtils.showSuccess("复制成功");
}, },
) )
@ -165,13 +147,11 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
width: 78.w, width: 78.w,
height: 30.h, height: 30.h,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: const BorderRadius.all( borderRadius: const BorderRadius.all(Radius.circular(6)),
Radius.circular(6)),
color: ColorUtil.Color_85_117_242, color: ColorUtil.Color_85_117_242,
), ),
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.center,
MainAxisAlignment.center,
children: [ children: [
Text( Text(
'进入', '进入',
@ -188,12 +168,8 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
], ],
), ),
), ),
onTap: () { onTap: (){
Get.toNamed(Routes.meetingMainPage, Get.toNamed(Routes.meetingMainPage, arguments: {"roomNumber": state.meetingRooms.value[index].roomNum});
arguments: {
"roomNumber": state.meetingRooms
.value[index].roomNum
});
}, },
) )
], ],
@ -208,7 +184,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
), ),
) )
], ],
))), ))
); );
} }

View File

@ -7,7 +7,6 @@ import 'package:wgshare/common/mixins/request_tool_mixin.dart';
import 'package:wgshare/utils/device_info.dart'; import 'package:wgshare/utils/device_info.dart';
import 'package:wgshare/utils/toast_utils.dart'; import 'package:wgshare/utils/toast_utils.dart';
import '../../common/config/app_config.dart';
import '../../common/models/common/base_structure_result.dart'; import '../../common/models/common/base_structure_result.dart';
import '../../common/models/user_info_entity.dart'; import '../../common/models/user_info_entity.dart';
import '../../common/store/app_storage_key.dart'; import '../../common/store/app_storage_key.dart';
@ -47,17 +46,16 @@ class LoginLogic extends GetxController with RequestToolMixin {
}else if(state.checkAgreementBool.value != true){ }else if(state.checkAgreementBool.value != true){
ToastUtils.showError("请阅读并勾选相关协议"); ToastUtils.showError("请阅读并勾选相关协议");
}else{ }else{
try{
ToastUtils.showLoading();
BaseStructureResult<UserInfoEntity> res = await getClient().login(state.userNameController.text, md5.convert(utf8.encode(state.passwordController.text)).toString()); BaseStructureResult<UserInfoEntity> res = await getClient().login(state.userNameController.text, md5.convert(utf8.encode(state.passwordController.text)).toString());
if (null != res.data) { if (null != res.data) {
UserStore.to.setToken(res.data!.token); UserStore.to.setToken(res.data!.token);
UserStore.to.setUserDetailInfo(res.data!); UserStore.to.setUserDetailInfo(res.data!);
UserStore.to.setLoginType(AppConfig.NORMAL_LOGIN); Get.toNamed(Routes.startPage);
Get.offAllNamed(Routes.startPage); }
state.userNameController.text = ""; }finally{
state.passwordController.text = ""; ToastUtils.dismiss();
state.meetingCodeController.text = "";
state.nickNameCodeController.text = "";
state.checkAgreementBool.value = false;
} }
} }
} }
@ -73,39 +71,16 @@ class LoginLogic extends GetxController with RequestToolMixin {
}else if(state.checkAgreementBool != true){ }else if(state.checkAgreementBool != true){
ToastUtils.showError("请阅读并勾选相关协议"); ToastUtils.showError("请阅读并勾选相关协议");
}else{ }else{
try{
ToastUtils.showLoading();
BaseStructureResult<UserInfoEntity> res = await getClient().anonLogin(await DeviceInfo.getDeviceId(),state.nickNameCodeController.text, state.meetingCodeController.text); BaseStructureResult<UserInfoEntity> res = await getClient().anonLogin(await DeviceInfo.getDeviceId(),state.nickNameCodeController.text, state.meetingCodeController.text);
if (null != res.data) { if (null != res.data) {
UserStore.to.setToken(res.data!.token); UserStore.to.setToken(res.data!.token);
UserStore.to.setUserDetailInfo(res.data!); UserStore.to.setUserDetailInfo(res.data!);
UserStore.to.setLoginType(AppConfig.ANONYMOUS_LOGIN);
Get.toNamed(Routes.meetingMainPage, arguments: {"roomNumber": state.meetingCodeController.text}); Get.toNamed(Routes.meetingMainPage, arguments: {"roomNumber": state.meetingCodeController.text});
state.userNameController.text = "";
state.passwordController.text = "";
state.meetingCodeController.text = "";
state.nickNameCodeController.text = "";
state.checkAgreementBool.value = false;
}
}
}
///
Future<void> doHttpCheckMeetingRoom() async {
if(state.meetingCodeController.text.isEmpty){
ToastUtils.showError("请输入会议号");
}else if(state.meetingCodeController.text.length != 8){
ToastUtils.showError("请输入正确的会议号");
}else if(state.nickNameCodeController.text.isEmpty){
ToastUtils.showError("请输入昵称");
}else if(state.checkAgreementBool != true){
ToastUtils.showError("请阅读并勾选相关协议");
}else{
BaseStructureResult<bool> res = await getClient().checkout(state.meetingCodeController.text);
if (null != res.data) {
if(res.data == true){
doHttpAnonymousLogin();
}else{
ToastUtils.showError("房间不存在");
} }
}finally{
ToastUtils.dismiss();
} }
} }
} }

View File

@ -378,7 +378,7 @@ class _LoginPageState extends State<LoginPage> {
if (state.pageState.value == 0) { if (state.pageState.value == 0) {
logic.doHttpLogin(); logic.doHttpLogin();
} else { } else {
logic.doHttpCheckMeetingRoom(); logic.doHttpAnonymousLogin();
} }
}, },
) )

View File

@ -1,11 +1,8 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'package:adaptive_dialog/adaptive_dialog.dart';
import 'package:agora_rtc_engine/agora_rtc_engine.dart'; import 'package:agora_rtc_engine/agora_rtc_engine.dart';
import 'package:date_format/date_format.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:signalr_core/signalr_core.dart'; import 'package:signalr_core/signalr_core.dart';
import 'package:wgshare/common/store/user_store.dart'; import 'package:wgshare/common/store/user_store.dart';
@ -16,7 +13,6 @@ import '../../common/models/common/base_structure_result.dart';
import '../../common/models/meeting_room_info.dart'; import '../../common/models/meeting_room_info.dart';
import '../../common/models/meeting_room_msg.dart'; import '../../common/models/meeting_room_msg.dart';
import '../../common/models/meeting_room_user.dart'; import '../../common/models/meeting_room_user.dart';
import '../../utils/agora/AgoraUtil.dart';
import '../../utils/permission/PermissionService.dart'; import '../../utils/permission/PermissionService.dart';
import '../../utils/toast_utils.dart'; import '../../utils/toast_utils.dart';
import 'meeting_main_state.dart'; import 'meeting_main_state.dart';
@ -54,20 +50,17 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
state.meetingToken.value = res.data!; state.meetingToken.value = res.data!;
if (isInit == true) { if (isInit == true) {
signalRSocket();
}else{
initRtc(); initRtc();
signalRSocket();
} }
} }
/// ///
/// 1. /// 1.
/// 2. /// 2.
Future<void> mergeFetch(bool isAgain) async { Future<void> mergeFetch() async {
try { try {
if (isAgain == false) {
ToastUtils.showLoading(); ToastUtils.showLoading();
}
var results = await Future.wait([ var results = await Future.wait([
getClient().getMeetingRoomInfo(state.roomNumber.value), getClient().getMeetingRoomInfo(state.roomNumber.value),
@ -99,7 +92,6 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
/// ///
void getMeetingRoomInfo(MeetingRoomInfo meetingRoomInfo) async { void getMeetingRoomInfo(MeetingRoomInfo meetingRoomInfo) async {
state.meetingRoomInfo.value = meetingRoomInfo; state.meetingRoomInfo.value = meetingRoomInfo;
initRtc();
startTime(); startTime();
} }
@ -107,7 +99,6 @@ 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();
} }
@ -147,7 +138,6 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
} else { } else {
state.users.value = state.cacheUsers.value; state.users.value = state.cacheUsers.value;
} }
update();
} }
/// ------------------------------------------------------------------------------ /// ------------------------------------------------------------------------------
@ -205,7 +195,6 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
if (res.data!.toString().length != 9) { if (res.data!.toString().length != 9) {
// //
if (state.remoteUid.value == UserStore.to.userInfoEntity.value!.uid) { if (state.remoteUid.value == UserStore.to.userInfoEntity.value!.uid) {
debugPrint("wgs输出===:当前全员观看是自己");
// //
// ID为0 // ID为0
state.remoteUid.value = "0"; state.remoteUid.value = "0";
@ -216,22 +205,10 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
// //
changePageState(1); changePageState(1);
} else { } else {
// , //
var isOtherOpenCamera = false;
for (var i = 0; i < state.cacheUsers.value.length; i++) {
if (state.cacheUsers.value[i].enableCamera == true) {
isOtherOpenCamera = true;
}
}
if(isOtherOpenCamera == false){
changePageState(0); changePageState(0);
}else{
state.remoteUid.value = "";
changePageState(1);
}
} }
} else { } else {
debugPrint("wgs输出===:当前全员观看不是自己");
// //
// //
var isCurrentUserIsCamera = false; var isCurrentUserIsCamera = false;
@ -245,10 +222,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
if (isCurrentUserIsCamera == true) { if (isCurrentUserIsCamera == true) {
// //
debugPrint("wgs输出===:当前会议室存在全员观看主播时,切换页面到视频状态"); debugPrint("wgs输出===:当前会议室存在全员观看主播时,切换页面到视频状态");
changePageState(0);
Future.delayed(const Duration(milliseconds: 200), () {
changePageState(1); changePageState(1);
});
} else { } else {
// ID为空并切换页面到视频状态 // ID为空并切换页面到视频状态
debugPrint("wgs输出===当前会议室不存在全员观看主播时设置主播ID为空并切换页面到视频状态"); debugPrint("wgs输出===当前会议室不存在全员观看主播时设置主播ID为空并切换页面到视频状态");
@ -257,21 +231,15 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
} }
} }
} else { } else {
if (state.remoteUid.value == //
UserStore.to.userInfoEntity.value!.screenShareId) { /*if(state.remoteUid.value == UserStore.to.userInfoEntity.value!.screenShareId){
// //
} else { }else{
// //
for (var i = 0; i < state.cacheUsers.value.length; i++) { changePageState(1);
if (state.remoteUid.value == }*/
state.cacheUsers.value[i].screenShareId) {
state.cacheUsers.value[i].enableShare = true;
} }
} }
}
}
update();
}
/// ///
Future<void> doHttpSetTvAnchor(String id) async { Future<void> doHttpSetTvAnchor(String id) async {
@ -332,52 +300,14 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
accessTokenFactory: () async => accessTokenFactory: () async =>
await Future.value(UserStore.to.token), await Future.value(UserStore.to.token),
logging: (level, message) => logging: (level, message) =>
debugPrint("wgs输出===SignalR Socket-日志:$message"), debugPrint("wgs输出===SignalR Socket-$message"),
)) ))
// 线52 4 4 5 10 // 线410 4 10 10
.withAutomaticReconnect([2000, 4000, 4000, 5000, 10000]).build(); .withAutomaticReconnect([10000, 4000, 10000, 10000]).build();
await state.hubConnection.value?.start(); await state.hubConnection.value?.start();
// joinMeetingToSocket();
state.hubConnection.value?.onreconnecting((error) {
debugPrint("wgs输出===SignalR Socket-重连$error");
if (EasyLoading.isShow == false) {
ToastUtils.showLoadingToMask("网络故障,正在重连...", EasyLoadingMaskType.black);
}
});
// 5
state.hubConnection.value?.onreconnected((connectionId) {
debugPrint("wgs输出===SignalR Socket-重连成功$connectionId");
joinMeetingToSocket(true);
ToastUtils.dismiss();
if (EasyLoading.isShow == false) {
ToastUtils.showSuccessToMask("重连成功!", EasyLoadingMaskType.black);
}
});
// 5
state.hubConnection.value?.onclose((error) {
debugPrint("wgs输出===SignalR Socket-重连失败$error");
ToastUtils.dismiss();
if (state.isNormaExit.value == false &&
state.isShowOkAlertDialog.value == false) {
showOkAlertDialog(
context: Get.context!,
title: "提示",
message: "网络错误,请重新加入会议室",
okLabel: "确定",
barrierDismissible: false,
).then((OkCancelResult value) {
Get.back();
Get.back();
});
}
});
joinMeetingToSocket(false);
/// ------------------------------------------------------------------------------ /// ------------------------------------------------------------------------------
/// ///
@ -391,22 +321,13 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
for (MeetingRoomUser mru in state.cacheUsers.value) { for (MeetingRoomUser mru in state.cacheUsers.value) {
if (mru.uid == meetingRoomUser.uid) { if (mru.uid == meetingRoomUser.uid) {
mru.roleId = meetingRoomUser.roleId; mru.roleId = meetingRoomUser.roleId;
if(state.defaulOpenState.value == 1){
mru.enableMicr = true; mru.enableMicr = true;
}
mru.isRoomManager = meetingRoomUser.isRoomManager; mru.isRoomManager = meetingRoomUser.isRoomManager;
} }
} }
if (UserStore.to.userInfoEntity.value!.uid == meetingRoomUser.uid) { if (UserStore.to.userInfoEntity.value!.uid == meetingRoomUser.uid) {
state.isSpeak.value = true; state.isSpeak.value = true;
debugPrint("wgs输出===Socket-状态:${state.defaulOpenState.value}"); state.isOpenMicrophone.value = true;
if (state.defaulOpenState.value == 1) {
debugPrint("wgs输出===Socket-状态1111111111111");
doHttpSetMicr(true);
} else if (state.defaulOpenState.value == 2) {
debugPrint("wgs输出===Socket-状态2222222222222");
doHttpSetCamer(true);
}
// SDK角色为主播 // SDK角色为主播
setClientRole("主播"); setClientRole("主播");
debugPrint("wgs输出===Socket-开启发言权限:主播"); debugPrint("wgs输出===Socket-开启发言权限:主播");
@ -417,20 +338,16 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
if (mru.uid == meetingRoomUser.uid) { if (mru.uid == meetingRoomUser.uid) {
mru.roleId = meetingRoomUser.roleId; mru.roleId = meetingRoomUser.roleId;
mru.enableMicr = false; mru.enableMicr = false;
mru.enableCamera = false;
mru.isRoomManager = meetingRoomUser.isRoomManager; mru.isRoomManager = meetingRoomUser.isRoomManager;
} }
} }
if (UserStore.to.userInfoEntity.value!.uid == meetingRoomUser.uid) { if (UserStore.to.userInfoEntity.value!.uid == meetingRoomUser.uid) {
state.isSpeak.value = false; state.isSpeak.value = false;
state.defaulOpenState.value = 0;
state.isOpenMicrophone.value = false; state.isOpenMicrophone.value = false;
state.isOpenCamera.value = false; state.isOpenCamera.value = false;
state.isOpenShare.value = false; state.isOpenShare.value = false;
state.remoteUid.value = "";
//
doHttpSetMicr(false);
doHttpSetCamer(false);
// SDK角色为观众 // SDK角色为观众
setClientRole("观众"); setClientRole("观众");
// //
@ -439,18 +356,14 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
stopPreview(); stopPreview();
// //
state.floating.value?.close(); state.floating.value?.close();
// //
if (state.remoteUid.value == "0") {
state.remoteUid.value = "";
changePageState(0); changePageState(0);
}
// //
// stopScreenCapture(); // stopScreenCapture();
debugPrint("wgs输出===Socket-关闭发言权限:观众"); debugPrint("wgs输出===Socket-关闭发言权限:观众");
} }
} }
update();
}); });
/// ------------------------------------------------------------------------------ /// ------------------------------------------------------------------------------
@ -466,7 +379,6 @@ 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();
}); });
/// ///
@ -504,7 +416,6 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
muteLocalAudioStream(true); muteLocalAudioStream(true);
} }
} }
update();
}); });
/// ------------------------------------------------------------------------------ /// ------------------------------------------------------------------------------
@ -518,7 +429,6 @@ 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");
}); });
@ -535,8 +445,6 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
} }
} }
state.users.value = state.cacheUsers.value; state.users.value = state.cacheUsers.value;
update();
doHttpGetTvAnchor();
debugPrint("wgs输出===Socket-远端用户或主播离开会议室:$jsonStr"); debugPrint("wgs输出===Socket-远端用户或主播离开会议室:$jsonStr");
}); });
@ -545,21 +453,15 @@ 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");
state.isNormaExit.value = true;
ToastUtils.showSuccess("你已被移除会议");
Future.delayed(const Duration(seconds: 1), () {
Get.back(); Get.back();
}); ToastUtils.showSuccess("你已被移除会议");
}); });
/// ///
state.hubConnection.value?.on("AllLeave", (e) { state.hubConnection.value?.on("AllLeave", (e) {
debugPrint("wgs输出===Socket-全员结束会议"); debugPrint("wgs输出===Socket-全员结束会议");
state.isNormaExit.value = true;
ToastUtils.showSuccess("会议已结束");
Future.delayed(const Duration(seconds: 1), () {
Get.back(); Get.back();
}); ToastUtils.showSuccess("会议已结束");
}); });
/// ------------------------------------------------------------------------------ /// ------------------------------------------------------------------------------
@ -568,9 +470,8 @@ 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);
List list = json.decode(jsonStr); List list = json.decode(jsonStr);
DateTime dateTime = DateTime.now(); MeetingRoomMsg meetingRoomMsg =
MeetingRoomMsg meetingRoomMsg = MeetingRoomMsg(list[0], list[1], list[2], MeetingRoomMsg(list[0], list[1], list[2], 0);
0, formatDate(dateTime, [HH, ':', nn, ':', ss]));
state.meetingRoomMsgs.value.add(meetingRoomMsg); state.meetingRoomMsgs.value.add(meetingRoomMsg);
update(); update();
Future.delayed(const Duration(milliseconds: 100), () { Future.delayed(const Duration(milliseconds: 100), () {
@ -632,7 +533,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
stopPreview(); stopPreview();
// //
if (state.remoteUid.value == "0") { if (state.remoteUid.value == "0") {
state.remoteUid.value = ""; changePageState(0);
} }
// //
if (state.floating.value?.isShowing == true) { if (state.floating.value?.isShowing == true) {
@ -640,7 +541,6 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
} }
} }
} }
update();
}); });
/// ///
@ -654,17 +554,10 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
} }
/// ///
/// isAgain Future<void> joinMeetingToSocket() 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); mergeFetch();
/*if(isAgain == false){
mergeFetch(isAgain);
initRtc(false);
}else{
mergeFetch(true);
}*/
} }
/// ///
@ -676,13 +569,11 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
/// ///
Future<void> sendMsg(String msg) async { Future<void> sendMsg(String msg) async {
DateTime dateTime = DateTime.now();
MeetingRoomMsg meetingRoomMsg = MeetingRoomMsg( MeetingRoomMsg meetingRoomMsg = MeetingRoomMsg(
UserStore.to.userInfoEntity.value!.uid, UserStore.to.userInfoEntity.value!.uid,
UserStore.to.userInfoEntity.value!.userName, UserStore.to.userInfoEntity.value!.userName,
msg, msg,
1, 1);
formatDate(dateTime, [HH, ':', nn, ':', ss]));
state.meetingRoomMsgs.value.add(meetingRoomMsg); state.meetingRoomMsgs.value.add(meetingRoomMsg);
update(); update();
Future.delayed(const Duration(milliseconds: 100), () { Future.delayed(const Duration(milliseconds: 100), () {
@ -717,9 +608,6 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
// //
await state.rctEngine.value?.enableAudioVolumeIndication( await state.rctEngine.value?.enableAudioVolumeIndication(
interval: 200, smooth: 3, reportVad: true); interval: 200, smooth: 3, reportVad: true);
//
await state.rctEngine.value
?.setDualStreamMode(mode: SimulcastStreamMode.enableSimulcastStream);
joinMeetingToRtc(); joinMeetingToRtc();
@ -728,7 +616,6 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
RtcEngineEventHandler( RtcEngineEventHandler(
// //
onJoinChannelSuccess: (RtcConnection connection, int elapsed) { onJoinChannelSuccess: (RtcConnection connection, int elapsed) {
state.isJoinSuccess.value = true;
debugPrint("wgs输出===RTC-自己加入会议室ID${connection.localUid}"); debugPrint("wgs输出===RTC-自己加入会议室ID${connection.localUid}");
}, },
@ -745,16 +632,6 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
// - // -
onUserOffline: (RtcConnection connection, int remoteUid, onUserOffline: (RtcConnection connection, int remoteUid,
UserOfflineReasonType reason) async { UserOfflineReasonType reason) async {
//
if (remoteUid.toString().length == 9) {
for (var i = 0; i < state.cacheUsers.value.length; i++) {
if (remoteUid.toString() ==
state.cacheUsers.value[i].screenShareId) {
state.cacheUsers.value[i].enableShare = false;
}
}
}
update();
debugPrint("wgs输出===RTC-远端用户或主播离开会议室用户或主机的ID$remoteUid"); debugPrint("wgs输出===RTC-远端用户或主播离开会议室用户或主机的ID$remoteUid");
}, },
@ -835,10 +712,8 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
}, },
// //
onClientRoleChanged: (RtcConnection connection, onClientRoleChanged: (RtcConnection connection, ClientRoleType oldRole,
ClientRoleType oldRole, ClientRoleType newRole, ClientRoleOptions newRoleOptions) {
ClientRoleType newRole,
ClientRoleOptions newRoleOptions) {
debugPrint( debugPrint(
"wgs输出===RTC-切换用户角色为:${newRole == ClientRoleType.clientRoleBroadcaster ? "主播" : "观众"}"); "wgs输出===RTC-切换用户角色为:${newRole == ClientRoleType.clientRoleBroadcaster ? "主播" : "观众"}");
}, },
@ -854,47 +729,6 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
debugPrint("wgs输出===RTC-本地视频状态发生改变:$source--$state--$reason"); debugPrint("wgs输出===RTC-本地视频状态发生改变:$source--$state--$reason");
}, },
//
onConnectionStateChanged: (RtcConnection connection,
ConnectionStateType stateType,
ConnectionChangedReasonType reason) {
debugPrint("wgs输出===RTC-网络连接状态发生改变:"
"会议室编号(${connection.channelId}"
"网络状态($stateType-${AgoraUtil.getConnectionStateChangedType(stateType)}"
"网络改变原因($reason-${AgoraUtil.getConnectionChangedReasonType(reason)}");
if (stateType == ConnectionStateType.connectionStateReconnecting) {
if (EasyLoading.isShow == false) {
ToastUtils.showLoadingToMask(
"网络故障,正在重连...", EasyLoadingMaskType.black);
}
} else if (stateType == ConnectionStateType.connectionStateConnected &&
reason ==
ConnectionChangedReasonType.connectionChangedRejoinSuccess) {
ToastUtils.dismiss();
if (EasyLoading.isShow == false) {
ToastUtils.showSuccessToMask("重连成功!", EasyLoadingMaskType.black);
}
} else if (reason ==
ConnectionChangedReasonType.connectionChangedLost) {
// 15signalR Socket一致SDK继续重连
Future.delayed(const Duration(milliseconds: 15000), () {
ToastUtils.dismiss();
if (state.isShowOkAlertDialog.value == false) {
showOkAlertDialog(
context: Get.context!,
title: "提示",
message: "网络错误,请重新加入会议室",
okLabel: "确定",
barrierDismissible: false,
).then((OkCancelResult value) {
Get.back();
Get.back();
});
}
});
}
}
// //
/*onPermissionError: (PermissionType permissionType){ /*onPermissionError: (PermissionType permissionType){
debugPrint("wgs输出===RTC-获取设备权限出错:$permissionType"); debugPrint("wgs输出===RTC-获取设备权限出错:$permissionType");

View File

@ -46,10 +46,6 @@ class MeetingMainState {
/// ///
late Rx<MeetingRoomInfo?> meetingRoomInfo = Rx(null); late Rx<MeetingRoomInfo?> meetingRoomInfo = Rx(null);
/// showOkAlertDialog
late RxBool isShowOkAlertDialog = false.obs;
/// 退退
late RxBool isNormaExit = false.obs;
/// ///
late RxString duration = "".obs; late RxString duration = "".obs;
@ -64,8 +60,6 @@ class MeetingMainState {
/// ///
late RxBool isSpeak = false.obs; late RxBool isSpeak = false.obs;
/// 012
late RxInt defaulOpenState = 0.obs;
/// ///
late RxBool isOpenMicrophone = false.obs; late RxBool isOpenMicrophone = false.obs;
/// ///
@ -76,8 +70,6 @@ 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;

View File

@ -3,14 +3,12 @@ import 'dart:ui';
import 'package:agora_rtc_engine/agora_rtc_engine.dart'; import 'package:agora_rtc_engine/agora_rtc_engine.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_floating/floating/assist/floating_slide_type.dart'; import 'package:flutter_floating/floating/assist/floating_slide_type.dart';
import 'package:flutter_floating/floating/floating.dart'; import 'package:flutter_floating/floating/floating.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:liquid_progress_indicator_v2/liquid_progress_indicator.dart'; import 'package:liquid_progress_indicator_v2/liquid_progress_indicator.dart';
import 'package:preload_page_view/preload_page_view.dart'; import 'package:preload_page_view/preload_page_view.dart';
import 'package:wgshare/common/config/app_config.dart';
import 'package:wgshare/common/store/user_store.dart'; import 'package:wgshare/common/store/user_store.dart';
import 'package:wgshare/utils/toast_utils.dart'; import 'package:wgshare/utils/toast_utils.dart';
@ -48,10 +46,7 @@ class MeetingMainPageState extends State<MeetingMainPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
state.context.value = context; state.context.value = context;
return PopScope( return Scaffold(
canPop: false,
child: FlutterEasyLoading(
child: Scaffold(
appBar: AppBar( appBar: AppBar(
surfaceTintColor: ColorUtil.Color_41_41_41, surfaceTintColor: ColorUtil.Color_41_41_41,
elevation: 0, elevation: 0,
@ -169,6 +164,22 @@ class MeetingMainPageState extends State<MeetingMainPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
///
Visibility(
visible: state.isSpeak.value,
child: GestureDetector(
child: Image.asset(
'assets/images/meeting_main_hang_up.png',
width: 22.w,
height: 22.h,
),
onTap: () {
logic.cancelSpeak();
},
),
),
SizedBox(width: 16.w),
/// 退 /// 退
GestureDetector( GestureDetector(
child: Image.asset( child: Image.asset(
@ -203,7 +214,7 @@ class MeetingMainPageState extends State<MeetingMainPage> {
// - // -
Visibility( Visibility(
visible: state.pageState.value == 1, visible: state.pageState.value == 1,
child: state.isJoinSuccess.value == true && null != state.rctEngine.value && null != state.users.value && state.users.value.isNotEmpty child: null != state.rctEngine.value
? Stack( ? Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
@ -275,20 +286,14 @@ class MeetingMainPageState extends State<MeetingMainPage> {
), ),
], ],
) )
: Container( : Container()),
color: ColorUtil.Color_0_0_0_0,
/*child: Text('加载反馈:是否成功加入会议室${state.isJoinSuccess.value}-会议室对象${state.rctEngine.value}-成员列表${state.users.value.length}-全员观看ID${state.remoteUid.value}'),*/
)),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
GestureDetector( GestureDetector(
child: Container( child: Container(
width: 200.w, width: 180.w,
height: 40.h, height: 40.h,
margin: const EdgeInsets.only( margin:
left: 20, bottom: 40), const EdgeInsets.only(left: 20, bottom: 40),
padding: const EdgeInsets.only(left: 20), padding: const EdgeInsets.only(left: 20),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
@ -301,8 +306,7 @@ class MeetingMainPageState extends State<MeetingMainPage> {
color: ColorUtil.Color_99_111_158), color: ColorUtil.Color_99_111_158),
), ),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Image.asset( Image.asset(
@ -324,41 +328,12 @@ class MeetingMainPageState extends State<MeetingMainPage> {
Get.bottomSheet( Get.bottomSheet(
isScrollControlled: true, isScrollControlled: true,
chatBottomSheet(context)); chatBottomSheet(context));
Future.delayed( Future.delayed(const Duration(milliseconds: 100),
const Duration(milliseconds: 100), () { () {
state.chatController.jumpTo(state state.chatController.jumpTo(state
.chatController .chatController.position.maxScrollExtent);
.position
.maxScrollExtent);
}); });
}, },
),
Visibility(
visible: state.isSpeak.value,
child: GestureDetector(
child: Container(
width: 82.w,
height: 40.h,
margin: const EdgeInsets.only(
left: 12, bottom: 40, right: 20),
alignment: Alignment.center,
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(99)),
color: ColorUtil.Color_255_69_69),
child: Text(
'结束发言',
style: TextStyle(
fontSize: 14.sp,
color: ColorUtil.Color_255_255_255),
),
),
onTap: () {
logic.cancelSpeak();
},
),
)
],
) )
], ],
), ),
@ -428,8 +403,7 @@ class MeetingMainPageState extends State<MeetingMainPage> {
if (state.isSpeak.value == false) { if (state.isSpeak.value == false) {
Get.bottomSheet( Get.bottomSheet(
isScrollControlled: true, isScrollControlled: true,
applySpeakPermissionBottomSheet( applySpeakPermissionBottomSheet(context));
context, 1));
} else { } else {
if (state.isOpenMicrophone.value == false) { if (state.isOpenMicrophone.value == false) {
logic.doHttpSetMicr(true); logic.doHttpSetMicr(true);
@ -456,9 +430,6 @@ class MeetingMainPageState extends State<MeetingMainPage> {
), ),
SizedBox(height: 4.h), SizedBox(height: 4.h),
Text( Text(
/*state.isSpeak.value == false
? '申请发言'
: */
state.isOpenCamera.value == true state.isOpenCamera.value == true
? "关闭视频" ? "关闭视频"
: "开启视频", : "开启视频",
@ -469,12 +440,7 @@ class MeetingMainPageState extends State<MeetingMainPage> {
], ],
), ),
onTap: () { onTap: () {
if (state.isSpeak.value == false) { if (state.isSpeak.value == true) {
Get.bottomSheet(
isScrollControlled: true,
applySpeakPermissionBottomSheet(
context, 2));
} else {
if (state.isOpenCamera.value == true) { if (state.isOpenCamera.value == true) {
logic.doHttpSetCamer(false); logic.doHttpSetCamer(false);
} else { } else {
@ -552,9 +518,7 @@ class MeetingMainPageState extends State<MeetingMainPage> {
meetingInfoFloatingLayer(), meetingInfoFloatingLayer(),
meetingAudioFloatingLayer(), meetingAudioFloatingLayer(),
], ],
))), )));
)
);
} }
/// 退 /// 退
@ -582,7 +546,6 @@ class MeetingMainPageState extends State<MeetingMainPage> {
), ),
), ),
onTap: () { onTap: () {
state.isNormaExit.value = true;
Get.back(); Get.back();
Get.back(); Get.back();
}, },
@ -779,13 +742,8 @@ class MeetingMainPageState extends State<MeetingMainPage> {
), ),
), ),
Expanded( Expanded(
child: GestureDetector(
child: Container( child: Container(
color: ColorUtil.Color_57_57_57_08, color: ColorUtil.Color_57_57_57_08,
),
onTap: () {
logic.changeMeetingInfoState(false);
},
)) ))
], ],
), ),
@ -799,13 +757,8 @@ class MeetingMainPageState extends State<MeetingMainPage> {
child: Column( child: Column(
children: [ children: [
Expanded( Expanded(
child: GestureDetector(
child: Container( child: Container(
color: ColorUtil.Color_57_57_57_08, color: ColorUtil.Color_57_57_57_08,
),
onTap: () {
logic.changeMeetingAudioState(false);
},
)), )),
Container( Container(
color: ColorUtil.Color_57_57_57_08, color: ColorUtil.Color_57_57_57_08,
@ -824,13 +777,8 @@ class MeetingMainPageState extends State<MeetingMainPage> {
), ),
), ),
Expanded( Expanded(
child: GestureDetector(
child: Container( child: Container(
color: ColorUtil.Color_57_57_57_08, color: ColorUtil.Color_57_57_57_08,
),
onTap: () {
logic.changeMeetingAudioState(false);
},
)) ))
], ],
), ),
@ -890,8 +838,7 @@ class MeetingMainPageState extends State<MeetingMainPage> {
} }
/// ///
Widget applySpeakPermissionBottomSheet( Widget applySpeakPermissionBottomSheet(BuildContext context) {
BuildContext context, int defaulOpenState) {
return Container( return Container(
height: 240.h, height: 240.h,
color: ColorUtil.Color_7_9_11, color: ColorUtil.Color_7_9_11,
@ -989,7 +936,6 @@ class MeetingMainPageState extends State<MeetingMainPage> {
), ),
), ),
onTap: () { onTap: () {
state.defaulOpenState.value = defaulOpenState;
logic.doHttpApplySpeak(); logic.doHttpApplySpeak();
Get.back(); Get.back();
}, },
@ -1087,15 +1033,13 @@ class MeetingMainPageState extends State<MeetingMainPage> {
Container( Container(
margin: margin:
const EdgeInsets.only(top: 18, left: 16, right: 16, bottom: 16), const EdgeInsets.only(top: 18, left: 16, right: 16, bottom: 16),
child: GetBuilder<MeetingMainLogic>(builder: (controll) { child: Text(
return Text(
'会议中(${state.users.value.length}', '会议中(${state.users.value.length}',
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: ColorUtil.Color_85_117_242), color: ColorUtil.Color_85_117_242),
); ),
}),
), ),
Expanded( Expanded(
child: ScrollConfiguration( child: ScrollConfiguration(
@ -1146,19 +1090,13 @@ class MeetingMainPageState extends State<MeetingMainPage> {
ColorUtil.Color_244_244_244), ColorUtil.Color_244_244_244),
), ),
), ),
Container( Text(
width: 76,
margin: const EdgeInsets.only(left: 6),
child: Text(
state.users.value[index].userName, state.users.value[index].userName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: ColorUtil.Color_243_243_243), color: ColorUtil.Color_243_243_243),
), ),
),
SizedBox(width: 8.w), SizedBox(width: 8.w),
Visibility( Visibility(
visible: visible:
@ -1200,10 +1138,7 @@ class MeetingMainPageState extends State<MeetingMainPage> {
children: [ children: [
Container( Container(
child: Image.asset( child: Image.asset(
state.users.value[index].enableShare == 'assets/images/meeting_main_share_currently.png',
true
? 'assets/images/meeting_main_share_currently.png'
: 'assets/images/meeting_main_share_currently_n.png',
width: 17.w, width: 17.w,
height: 17.h, height: 17.h,
), ),
@ -1387,23 +1322,10 @@ class MeetingMainPageState extends State<MeetingMainPage> {
children: [ children: [
Container( Container(
margin: const EdgeInsets.only(left: 6), margin: const EdgeInsets.only(left: 6),
child: Text.rich( child: Text(
TextSpan( state.meetingRoomMsgs.value[index].userName,
children: [
TextSpan(
text: state.meetingRoomMsgs.value[index].userName,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, color: ColorUtil.Color_202_202_202), fontSize: 10.sp, color: ColorUtil.Color_202_202_202),
),
TextSpan(
text: " ${state.meetingRoomMsgs.value[index].time}",
style: TextStyle(
fontSize: 10.sp, color: ColorUtil.Color_202_202_202
),
),
],
),
textAlign: TextAlign.left,
), ),
), ),
Container( Container(
@ -1412,9 +1334,9 @@ class MeetingMainPageState extends State<MeetingMainPage> {
left: 18, right: 18, top: 10, bottom: 10), left: 18, right: 18, top: 10, bottom: 10),
decoration: const BoxDecoration( decoration: const BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(30), bottomLeft: Radius.circular(99),
topRight: Radius.circular(30), topRight: Radius.circular(99),
bottomRight: Radius.circular(30)), bottomRight: Radius.circular(99)),
color: ColorUtil.Color_53_53_53, color: ColorUtil.Color_53_53_53,
), ),
child: Text( child: Text(
@ -1446,23 +1368,10 @@ class MeetingMainPageState extends State<MeetingMainPage> {
children: [ children: [
Container( Container(
margin: const EdgeInsets.only(right: 6), margin: const EdgeInsets.only(right: 6),
child: Text.rich( child: Text(
TextSpan( state.meetingRoomMsgs.value[index].userName,
children: [
TextSpan(
text: "${state.meetingRoomMsgs.value[index].time} ",
style: TextStyle( style: TextStyle(
fontSize: 10.sp, color: ColorUtil.Color_202_202_202 fontSize: 10.sp, color: ColorUtil.Color_202_202_202),
),
),
TextSpan(
text: state.meetingRoomMsgs.value[index].userName,
style: TextStyle(
fontSize: 12.sp, color: ColorUtil.Color_202_202_202),
),
],
),
textAlign: TextAlign.right,
), ),
), ),
Container( Container(
@ -1471,9 +1380,9 @@ class MeetingMainPageState extends State<MeetingMainPage> {
left: 18, right: 18, top: 10, bottom: 10), left: 18, right: 18, top: 10, bottom: 10),
decoration: const BoxDecoration( decoration: const BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(30), topLeft: Radius.circular(99),
bottomLeft: Radius.circular(30), bottomLeft: Radius.circular(99),
bottomRight: Radius.circular(30)), bottomRight: Radius.circular(99)),
color: ColorUtil.Color_85_117_242, color: ColorUtil.Color_85_117_242,
), ),
child: Text( child: Text(
@ -1561,8 +1470,7 @@ class MeetingMainPageState extends State<MeetingMainPage> {
var pageList = []; var pageList = [];
/// ///
pageList.add(GetBuilder<MeetingMainLogic>(builder: (controll) { pageList.add(Stack(
return Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
state.remoteUid.value != "" state.remoteUid.value != ""
@ -1571,10 +1479,7 @@ class MeetingMainPageState extends State<MeetingMainPage> {
rtcEngine: state.rctEngine.value!, rtcEngine: state.rctEngine.value!,
canvas: VideoCanvas( canvas: VideoCanvas(
uid: int.tryParse(state.remoteUid.value), uid: int.tryParse(state.remoteUid.value),
setupMode: VideoViewSetupMode.videoViewSetupAdd, setupMode: VideoViewSetupMode.videoViewSetupAdd),
renderMode: state.remoteUid.value.length == 9
? RenderModeType.renderModeFit
: RenderModeType.renderModeHidden),
), ),
) )
: Container( : Container(
@ -1634,12 +1539,10 @@ class MeetingMainPageState extends State<MeetingMainPage> {
), ),
), ),
], ],
); ));
}));
/// gridview /// gridview
pageList.add(GetBuilder<MeetingMainLogic>(builder: (controll){ pageList.add(Container(
return Container(
color: ColorUtil.Color_57_57_57, color: ColorUtil.Color_57_57_57,
child: GridView.builder( child: GridView.builder(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
@ -1649,7 +1552,8 @@ class MeetingMainPageState extends State<MeetingMainPage> {
return Stack( return Stack(
children: [ children: [
state.cacheUsers.value[index].enableCamera == true state.cacheUsers.value[index].enableCamera == true
? state.cacheUsers.value[index].uid == 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!,
@ -1735,17 +1639,12 @@ class MeetingMainPageState extends State<MeetingMainPage> {
shapePath: shapePath:
ViewSvgPath.getMicrpphonePath()), ViewSvgPath.getMicrpphonePath()),
), ),
SizedBox( Text(
width: 70,
child: Text(
state.cacheUsers.value[index].userName, state.cacheUsers.value[index].userName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: ColorUtil.Color_255_255_255), color: ColorUtil.Color_255_255_255),
) )
)
], ],
) )
: Row( : Row(
@ -1757,17 +1656,12 @@ class MeetingMainPageState extends State<MeetingMainPage> {
width: 20.w, width: 20.w,
height: 20.h, height: 20.h,
), ),
SizedBox( Text(
width: 70,
child: Text(
state.cacheUsers.value[index].userName, state.cacheUsers.value[index].userName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: ColorUtil.Color_255_255_255), color: ColorUtil.Color_255_255_255),
) )
)
], ],
), ),
) )
@ -1777,9 +1671,7 @@ class MeetingMainPageState extends State<MeetingMainPage> {
], ],
); );
}), }),
); ));
}));
return pageList[position]; return pageList[position];
} }
} }

View File

@ -72,16 +72,11 @@ class MeetingMainVoiceComponent extends StatelessWidget {
shapePath: ViewSvgPath.getMicrpphonePath() shapePath: ViewSvgPath.getMicrpphonePath()
), ),
), ),
SizedBox( Text(
width: 70,
child: Text(
users[index].userName, users[index].userName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: ColorUtil.Color_255_255_255), color: ColorUtil.Color_255_255_255),
),
) )
], ],
) )
@ -94,16 +89,11 @@ class MeetingMainVoiceComponent extends StatelessWidget {
width: 20.w, width: 20.w,
height: 20.h, height: 20.h,
), ),
SizedBox( Text(
width: 70,
child: Text(
users[index].userName, users[index].userName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: ColorUtil.Color_255_255_255), color: ColorUtil.Color_255_255_255),
),
) )
], ],
), ),

View File

@ -11,6 +11,6 @@ class UserLogic extends GetxController with RequestToolMixin {
/// 退 /// 退
void logout(){ void logout(){
UserStore.to.erase(); UserStore.to.erase();
Get.toNamed(Routes.loginPage); Get.offAllNamed(Routes.loginPage);
} }
} }

View File

@ -77,7 +77,7 @@ class UserPageState extends State<UserPage> {
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
UserStore.to.userInfoEntity.value!.userName.length >= 3 UserStore.to.userInfoEntity.value!.userName.length >= 3
? UserStore.to.userInfoEntity.value!.userName.substring(UserStore.to.userInfoEntity.value!.userName.length - 2,UserStore.to.userInfoEntity.value!.userName.length) ? UserStore.to.userInfoEntity.value!.userName.substring(1,UserStore.to.userInfoEntity.value!.userName.length)
: UserStore.to.userInfoEntity.value!.userName, : UserStore.to.userInfoEntity.value!.userName,
style: TextStyle( style: TextStyle(
fontSize: 30.sp, fontSize: 30.sp,

View File

@ -1,110 +0,0 @@
import 'package:agora_rtc_engine/agora_rtc_engine.dart';
/// SDK相关工具类
class AgoraUtil{
///
static String getConnectionStateChangedType(ConnectionStateType type){
var returnTypeStr = "";
switch(type){
case ConnectionStateType.connectionStateDisconnected:
returnTypeStr = "网络连接断开";
break;
case ConnectionStateType.connectionStateConnecting:
returnTypeStr = "网络连接中";
break;
case ConnectionStateType.connectionStateConnected:
returnTypeStr = "网络已连接";
break;
case ConnectionStateType.connectionStateReconnecting:
returnTypeStr = "网络重新连接中";
break;
case ConnectionStateType.connectionStateFailed:
returnTypeStr = "网络连接失败";
break;
}
return returnTypeStr;
}
///
static String getConnectionChangedReasonType(ConnectionChangedReasonType type){
var returnTypeStr = "";
switch(type){
case ConnectionChangedReasonType.connectionChangedConnecting:
returnTypeStr = "建立网络连接中";
break;
case ConnectionChangedReasonType.connectionChangedJoinSuccess:
returnTypeStr = "成功加入频道";
break;
case ConnectionChangedReasonType.connectionChangedInterrupted:
returnTypeStr = "网络连接中断";
break;
case ConnectionChangedReasonType.connectionChangedBannedByServer:
returnTypeStr = "网络连接被服务器禁止";
break;
case ConnectionChangedReasonType.connectionChangedJoinFailed:
returnTypeStr = "加入频道失败";
break;
case ConnectionChangedReasonType.connectionChangedLeaveChannel:
returnTypeStr = "离开频道";
break;
case ConnectionChangedReasonType.connectionChangedInvalidAppId:
returnTypeStr = "App ID 无效";
break;
case ConnectionChangedReasonType.connectionChangedInvalidChannelName:
returnTypeStr = "频道名无效";
break;
case ConnectionChangedReasonType.connectionChangedInvalidToken:
returnTypeStr = "Token 无效";
break;
case ConnectionChangedReasonType.connectionChangedTokenExpired:
returnTypeStr = "当前使用的 Token 已过期";
break;
case ConnectionChangedReasonType.connectionChangedRejectedByServer:
returnTypeStr = "此用户被服务器禁止";
break;
case ConnectionChangedReasonType.connectionChangedSettingProxyServer:
returnTypeStr = "设置了代理服务器";
break;
case ConnectionChangedReasonType.connectionChangedRenewToken:
returnTypeStr = "更新 Token 引起网络连接状态改变";
break;
case ConnectionChangedReasonType.connectionChangedClientIpAddressChanged:
returnTypeStr = "客户端 IP 地址变更";
break;
case ConnectionChangedReasonType.connectionChangedKeepAliveTimeout:
returnTypeStr = "SDK 和服务器连接保活超时";
break;
case ConnectionChangedReasonType.connectionChangedRejoinSuccess:
returnTypeStr = "重新加入频道成功";
break;
case ConnectionChangedReasonType.connectionChangedLost:
returnTypeStr = "SDK 和服务器失去连接";
break;
case ConnectionChangedReasonType.connectionChangedEchoTest:
returnTypeStr = "连接状态变化由回声测试引起";
break;
case ConnectionChangedReasonType.connectionChangedClientIpAddressChangedByUser:
returnTypeStr = "本地 IP 地址被用户更改";
break;
case ConnectionChangedReasonType.connectionChangedSameUidLogin:
returnTypeStr = "使用相同的 UID 从不同的设备加入同一频道";
break;
case ConnectionChangedReasonType.connectionChangedTooManyBroadcasters:
returnTypeStr = "频道内主播人数已达上限";
break;
case ConnectionChangedReasonType.connectionChangedLicenseValidationFailure:
returnTypeStr = "连接已更改许可证验证失败";
break;
case ConnectionChangedReasonType.connectionChangedCertificationVeryfyFailure:
returnTypeStr = "连接已更改认证版本失败";
break;
case ConnectionChangedReasonType.connectionChangedStreamChannelNotAvailable:
returnTypeStr = "连接已更改流通道不可用";
break;
case ConnectionChangedReasonType.connectionChangedInconsistentAppid:
returnTypeStr = "连接已更改不一致Appid";
break;
}
return returnTypeStr;
}
}

View File

@ -71,8 +71,6 @@ class ColorUtil {
static const Color_16_19_13 = Color.fromRGBO(16, 19, 13, 1); static const Color_16_19_13 = Color.fromRGBO(16, 19, 13, 1);
static const Color_255_69_69 = Color.fromRGBO(255, 69, 69, 1);
/// ///
/// hex, 0xffffff, /// hex, 0xffffff,
/// alpha, [0.0,1.0] /// alpha, [0.0,1.0]

View File

@ -51,10 +51,6 @@ class ToastUtils {
EasyLoading.showError(showMsg, duration: duration); EasyLoading.showError(showMsg, duration: duration);
} }
static showLoadingToMask(String str, EasyLoadingMaskType maskType) {
EasyLoading.show(status: str, maskType: maskType);
}
static showLoading() { static showLoading() {
EasyLoading.show(status: 'loading...'); EasyLoading.show(status: 'loading...');
} }
@ -67,10 +63,6 @@ class ToastUtils {
EasyLoading.showInfo(showMsg, duration: Duration(microseconds: microseconds)); EasyLoading.showInfo(showMsg, duration: Duration(microseconds: microseconds));
} }
static showSuccessToMask(String showMsg, EasyLoadingMaskType maskType, {Duration? duration}) {
EasyLoading.showSuccess(showMsg, maskType: maskType, duration: duration);
}
static showSuccess(String showMsg, {Duration? duration}) { static showSuccess(String showMsg, {Duration? duration}) {
EasyLoading.showSuccess(showMsg, duration: duration); EasyLoading.showSuccess(showMsg, duration: duration);
} }

View File

@ -6,10 +6,6 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <dynamic_color/dynamic_color_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) { void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
} }

View File

@ -3,7 +3,6 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
dynamic_color
) )
list(APPEND FLUTTER_FFI_PLUGIN_LIST list(APPEND FLUTTER_FFI_PLUGIN_LIST

View File

@ -6,28 +6,20 @@ import FlutterMacOS
import Foundation import Foundation
import agora_rtc_engine import agora_rtc_engine
import appkit_ui_element_colors
import device_info_plus import device_info_plus
import dynamic_color
import flutter_inappwebview_macos import flutter_inappwebview_macos
import geolocator_apple import geolocator_apple
import iris_method_channel import iris_method_channel
import macos_ui
import macos_window_utils
import package_info_plus import package_info_plus
import path_provider_foundation import path_provider_foundation
import sqflite_darwin import sqflite_darwin
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AgoraRtcNgPlugin.register(with: registry.registrar(forPlugin: "AgoraRtcNgPlugin")) AgoraRtcNgPlugin.register(with: registry.registrar(forPlugin: "AgoraRtcNgPlugin"))
AppkitUiElementColorsPlugin.register(with: registry.registrar(forPlugin: "AppkitUiElementColorsPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin")) InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin"))
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin")) GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
IrisMethodChannelPlugin.register(with: registry.registrar(forPlugin: "IrisMethodChannelPlugin")) IrisMethodChannelPlugin.register(with: registry.registrar(forPlugin: "IrisMethodChannelPlugin"))
MacOSUiPlugin.register(with: registry.registrar(forPlugin: "MacOSUiPlugin"))
MacOSWindowUtilsPlugin.register(with: registry.registrar(forPlugin: "MacOSWindowUtilsPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))

View File

@ -14,14 +14,6 @@ packages:
description: dart description: dart
source: sdk source: sdk
version: "0.3.2" version: "0.3.2"
adaptive_dialog:
dependency: "direct main"
description:
name: adaptive_dialog
sha256: a87f9e13fdbe0b11d353733a90796129ee79fc0654a27855fa2c9c0a3633a362
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.3.0"
agora_rtc_engine: agora_rtc_engine:
dependency: "direct main" dependency: "direct main"
description: description:
@ -38,22 +30,6 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "6.7.0" version: "6.7.0"
animations:
dependency: transitive
description:
name: animations
sha256: d3d6dcfb218225bbe68e87ccf6378bbb2e32a94900722c5f81611dad089911cb
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.11"
appkit_ui_element_colors:
dependency: transitive
description:
name: appkit_ui_element_colors
sha256: c3e50f900aae314d339de489535736238627071457c4a4a2dbbb1545b4f04f22
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.0"
args: args:
dependency: transitive dependency: transitive
description: description:
@ -238,14 +214,6 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.3.7" version: "2.3.7"
date_format:
dependency: "direct main"
description:
name: date_format
sha256: a48254e60bdb7f1d5a15cac7f86e37491808056c0a99dbdc850841def4754ddc
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.9"
device_info_plus: device_info_plus:
dependency: "direct main" dependency: "direct main"
description: description:
@ -278,14 +246,6 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.0" version: "2.0.0"
dynamic_color:
dependency: transitive
description:
name: dynamic_color
sha256: eae98052fa6e2826bdac3dd2e921c6ce2903be15c6b7f8b6d8a5d49b5086298d
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.7.0"
easy_debounce: easy_debounce:
dependency: "direct main" dependency: "direct main"
description: description:
@ -586,14 +546,6 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.1.2" version: "2.1.2"
gradient_borders:
dependency: transitive
description:
name: gradient_borders
sha256: b1cd969552c83f458ff755aa68e13a0327d09f06c3f42f471b423b01427f21f8
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.1"
graphs: graphs:
dependency: transitive dependency: transitive
description: description:
@ -634,14 +586,6 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "4.0.2" version: "4.0.2"
intersperse:
dependency: transitive
description:
name: intersperse
sha256: "2f8a905c96f6cbba978644a3d5b31b8d86ddc44917662df7d27a61f3df66a576"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
intl: intl:
dependency: transitive dependency: transitive
description: description:
@ -746,22 +690,6 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.3.0" version: "1.3.0"
macos_ui:
dependency: transitive
description:
name: macos_ui
sha256: "80f6539aba5a3a1182d5225a6c27969a780bcb1d2d8135b4ffb708570cf0c854"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.9"
macos_window_utils:
dependency: transitive
description:
name: macos_window_utils
sha256: "3534f2af024f2f24112ca28789a44e6750083f8c0065414546c6593ee48a5009"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.1"
macros: macros:
dependency: transitive dependency: transitive
description: description:

View File

@ -33,6 +33,8 @@ dependencies:
flutter_localizations: flutter_localizations:
sdk: flutter sdk: flutter
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8 cupertino_icons: ^1.0.8
@ -84,14 +86,9 @@ dependencies:
preload_page_view: ^0.2.0 preload_page_view: ^0.2.0
# webview # webview
#webview_flutter: ^3.0.4
flutter_inappwebview: ^6.1.5 flutter_inappwebview: ^6.1.5
# 时间组件
date_format: ^2.0.9
# 弹窗
adaptive_dialog: ^2.3.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter

View File

@ -7,7 +7,6 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <agora_rtc_engine/agora_rtc_engine_plugin.h> #include <agora_rtc_engine/agora_rtc_engine_plugin.h>
#include <dynamic_color/dynamic_color_plugin_c_api.h>
#include <flutter_inappwebview_windows/flutter_inappwebview_windows_plugin_c_api.h> #include <flutter_inappwebview_windows/flutter_inappwebview_windows_plugin_c_api.h>
#include <geolocator_windows/geolocator_windows.h> #include <geolocator_windows/geolocator_windows.h>
#include <iris_method_channel/iris_method_channel_plugin_c_api.h> #include <iris_method_channel/iris_method_channel_plugin_c_api.h>
@ -16,8 +15,6 @@
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
AgoraRtcEnginePluginRegisterWithRegistrar( AgoraRtcEnginePluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("AgoraRtcEnginePlugin")); registry->GetRegistrarForPlugin("AgoraRtcEnginePlugin"));
DynamicColorPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
FlutterInappwebviewWindowsPluginCApiRegisterWithRegistrar( FlutterInappwebviewWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi")); registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi"));
GeolocatorWindowsRegisterWithRegistrar( GeolocatorWindowsRegisterWithRegistrar(

View File

@ -4,7 +4,6 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
agora_rtc_engine agora_rtc_engine
dynamic_color
flutter_inappwebview_windows flutter_inappwebview_windows
geolocator_windows geolocator_windows
iris_method_channel iris_method_channel