From 297d09ffd6e3f04cd426d9954a9d32808b1da62d Mon Sep 17 00:00:00 2001 From: fuenmao <980740792@qq.com> Date: Fri, 22 Nov 2024 14:27:56 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=BF=81=E7=A7=BB=E5=AE=8C?= =?UTF-8?q?=E6=AF=95=EF=BC=8C=E7=9B=B8=E5=85=B3=E4=B8=8D=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=8A=B6=E6=80=81=E6=B7=BB=E5=8A=A0=E5=AE=8C?= =?UTF-8?q?=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wgshare/lib/pages/homePage/home_view.dart | 35 +- wgshare/lib/pages/loginPage/login_logic.dart | 4 +- wgshare/lib/pages/loginPage/login_state.dart | 4 +- wgshare/lib/pages/loginPage/login_view.dart | 95 +- .../pages/metting/meeting_main_binding.dart | 10 + .../lib/pages/metting/meeting_main_logic.dart | 22 + .../lib/pages/metting/meeting_main_state.dart | 21 + .../lib/pages/metting/meeting_main_view.dart | 1237 +++++++++++++++++ .../share/meeting_main_share_binding.dart | 10 + .../share/meeting_main_share_logic.dart | 7 + .../share/meeting_main_share_state.dart | 5 + .../share/meeting_main_share_view.dart | 137 ++ .../video/meeting_main_video_binding.dart | 10 + .../video/meeting_main_video_logic.dart | 7 + .../video/meeting_main_video_state.dart | 5 + .../video/meeting_main_video_view.dart | 246 ++++ .../voice/meeting_main_voice_binding.dart | 10 + .../voice/meeting_main_voice_logic.dart | 7 + .../voice/meeting_main_voice_state.dart | 5 + .../voice/meeting_main_voice_view.dart | 75 + wgshare/lib/pages/start_page.dart | 22 +- .../{user_page.dart => user_view.dart} | 62 +- wgshare/lib/routes/app_pages.dart | 7 +- wgshare/lib/routes/app_routes.dart | 18 +- wgshare/lib/utils/color_util.dart | 2 + wgshare/lib/utils/cus_behavior.dart | 13 + 26 files changed, 1966 insertions(+), 110 deletions(-) create mode 100644 wgshare/lib/pages/metting/meeting_main_binding.dart create mode 100644 wgshare/lib/pages/metting/meeting_main_logic.dart create mode 100644 wgshare/lib/pages/metting/meeting_main_state.dart create mode 100644 wgshare/lib/pages/metting/meeting_main_view.dart create mode 100644 wgshare/lib/pages/metting/share/meeting_main_share_binding.dart create mode 100644 wgshare/lib/pages/metting/share/meeting_main_share_logic.dart create mode 100644 wgshare/lib/pages/metting/share/meeting_main_share_state.dart create mode 100644 wgshare/lib/pages/metting/share/meeting_main_share_view.dart create mode 100644 wgshare/lib/pages/metting/video/meeting_main_video_binding.dart create mode 100644 wgshare/lib/pages/metting/video/meeting_main_video_logic.dart create mode 100644 wgshare/lib/pages/metting/video/meeting_main_video_state.dart create mode 100644 wgshare/lib/pages/metting/video/meeting_main_video_view.dart create mode 100644 wgshare/lib/pages/metting/voice/meeting_main_voice_binding.dart create mode 100644 wgshare/lib/pages/metting/voice/meeting_main_voice_logic.dart create mode 100644 wgshare/lib/pages/metting/voice/meeting_main_voice_state.dart create mode 100644 wgshare/lib/pages/metting/voice/meeting_main_voice_view.dart rename wgshare/lib/pages/userPage/{user_page.dart => user_view.dart} (83%) create mode 100644 wgshare/lib/utils/cus_behavior.dart diff --git a/wgshare/lib/pages/homePage/home_view.dart b/wgshare/lib/pages/homePage/home_view.dart index 6b0e158..f9fc475 100644 --- a/wgshare/lib/pages/homePage/home_view.dart +++ b/wgshare/lib/pages/homePage/home_view.dart @@ -2,9 +2,11 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:wgshare/common/models/user_info_detail.dart'; import 'package:wgshare/common/store/user_store.dart'; +import 'package:wgshare/main.dart'; import 'package:wgshare/routes/app_routes.dart'; import 'package:wgshare/utils/my_text.dart'; import 'package:wgshare/utils/storage.dart'; @@ -52,13 +54,13 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { children: [ Container( width: double.infinity, - height: 44, + height: 44.h, alignment: Alignment.center, color: Colors.white, child: Text( '会议列表', style: TextStyle( - fontSize: 16, + fontSize: 16.sp, color: ColorUtil.Color_51_51_51, fontWeight: FontWeight.w500 ), @@ -85,7 +87,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { Text( '奉节中学期末考试分析总结会议', style: TextStyle( - fontSize: 14, + fontSize: 14.sp, color: ColorUtil.Color_89_88_88, fontWeight: FontWeight.w500 ), @@ -94,13 +96,13 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { children: [ Image.asset( 'assets/images/index_persons.png', - width: 16, - height: 16, + width: 16.w, + height: 16.h, ), Text( '2人', style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: ColorUtil.Color_177_177_177, ), ), @@ -108,7 +110,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { ) ], ), - const SizedBox(height: 20), + SizedBox(height: 20.h), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -117,22 +119,22 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { Text( '2525353', style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: ColorUtil.Color_177_177_177, ), ), - const SizedBox(width: 6), + SizedBox(width: 6.w), Image.asset( 'assets/images/index_copy.png', - width: 16, - height: 16, + width: 16.w, + height: 16.h, ) ], ), GestureDetector( child: Container( - width: 78, - height: 30, + width: 78.w, + height: 30.h, decoration: BoxDecoration( borderRadius: const BorderRadius.all(Radius.circular(6)), color: ColorUtil.Color_85_117_242, @@ -143,19 +145,20 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { Text( '进入', style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: Colors.white, ), ), Image.asset( 'assets/images/index_right.png', - width: 16, - height: 16, + width: 16.w, + height: 16.h, ) ], ), ), onTap: (){ + Get.toNamed(Routes.meetingMainPage); // Navigator.of(context).push(MaterialPageRoute(builder: (context) => MeetingMainPage())); }, ) diff --git a/wgshare/lib/pages/loginPage/login_logic.dart b/wgshare/lib/pages/loginPage/login_logic.dart index f0fbc31..e081931 100644 --- a/wgshare/lib/pages/loginPage/login_logic.dart +++ b/wgshare/lib/pages/loginPage/login_logic.dart @@ -12,8 +12,8 @@ class LoginLogic extends GetxController with RequestToolMixin { } /// 改变勾选协议状态 - void changeAgreementState(int checkAgreementState){ - state.checkAgreementState.value = checkAgreementState; + void changeAgreementState(bool checkAgreementBool){ + state.checkAgreementBool.value = checkAgreementBool; } @override diff --git a/wgshare/lib/pages/loginPage/login_state.dart b/wgshare/lib/pages/loginPage/login_state.dart index 89c7175..2369923 100644 --- a/wgshare/lib/pages/loginPage/login_state.dart +++ b/wgshare/lib/pages/loginPage/login_state.dart @@ -14,6 +14,6 @@ class LoginState { /// 页面状态,0:账号,1:会议号 late RxInt pageState = 0.obs; - /// 是否勾选协议,0:否,1:是 - late RxInt checkAgreementState = 0.obs; + /// 是否勾选协议 + late RxBool checkAgreementBool = false.obs; } diff --git a/wgshare/lib/pages/loginPage/login_view.dart b/wgshare/lib/pages/loginPage/login_view.dart index e106735..2040581 100644 --- a/wgshare/lib/pages/loginPage/login_view.dart +++ b/wgshare/lib/pages/loginPage/login_view.dart @@ -1,9 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:wgshare/main.dart'; import 'package:wgshare/utils/my_text.dart'; import 'package:wgshare/utils/utils.dart'; +import '../../routes/app_routes.dart'; import '../../utils/color_util.dart'; import 'login_logic.dart'; @@ -51,14 +54,14 @@ class _LoginPageState extends State { children: [ Image.asset( 'assets/images/logo.png', - width: 80, - height: 80, + width: 80.w, + height: 80.h, ), - const SizedBox(height: 20), + SizedBox(height: 20.h), Image.asset( 'assets/images/logo_title.png', - width: 70, - height: 24, + width: 70.w, + height: 24.h, ) ], ), @@ -86,8 +89,8 @@ class _LoginPageState extends State { children: [ GestureDetector( child: Container( - width: 140, - height: 40, + width: 140.w, + height: 40.h, decoration: BoxDecoration( image: DecorationImage( image: AssetImage(state.pageState.value == 0 ? 'assets/images/login_tab_left_select_y.png' : 'assets/images/login_tab_left_select_n.png'), @@ -98,7 +101,7 @@ class _LoginPageState extends State { child: Text( '账号', style: TextStyle( - fontSize: 14, + fontSize: 14.sp, color: state.pageState.value == 0 ? Colors.white : ColorUtil.Color_120_137_203 ), ), @@ -109,8 +112,8 @@ class _LoginPageState extends State { ), GestureDetector( child: Container( - width: 140, - height: 40, + width: 140.w, + height: 40.h, decoration: BoxDecoration( image: DecorationImage( image: AssetImage(state.pageState.value == 0 ? 'assets/images/login_tab_right_select_n.png' : 'assets/images/login_tab_right_select_y.png'), @@ -121,7 +124,7 @@ class _LoginPageState extends State { child: Text( '会议号', style: TextStyle( - fontSize: 14, + fontSize: 14.sp, color: state.pageState.value == 0 ? ColorUtil.Color_120_137_203 : Colors.white ), ), @@ -140,20 +143,20 @@ class _LoginPageState extends State { Visibility( visible: state.pageState.value == 0 ? true : false, child: Container( - width: 280, - height: 40, + width: 280.w, + height: 40.h, margin: const EdgeInsets.only(top: 30), padding: const EdgeInsets.only(left: 12, right: 12), decoration: BoxDecoration( borderRadius: const BorderRadius.all(Radius.circular(99)), border: Border.all( - width: 1, + width: 1.w, color: ColorUtil.Color_153_153_153 ), ), child: TextField( style: TextStyle( - fontSize: 14, + fontSize: 14.sp, ), decoration: InputDecoration( contentPadding: EdgeInsets.all(0), @@ -161,7 +164,7 @@ class _LoginPageState extends State { hintText: '请输入账号', hintStyle: TextStyle( color: ColorUtil.Color_153_153_153, - fontSize: 14) + fontSize: 14.sp) ), ), ), @@ -170,20 +173,20 @@ class _LoginPageState extends State { Visibility( visible: state.pageState.value == 0 ? true : false, child: Container( - width: 280, - height: 40, + width: 280.w, + height: 40.h, margin: const EdgeInsets.only(top: 12), padding: const EdgeInsets.only(left: 12, right: 12), decoration: BoxDecoration( borderRadius: const BorderRadius.all(Radius.circular(99)), border: Border.all( - width: 1, + width: 1.w, color: ColorUtil.Color_153_153_153 ), ), child: TextField( style: TextStyle( - fontSize: 14, + fontSize: 14.sp, ), decoration: InputDecoration( contentPadding: EdgeInsets.all(0), @@ -191,7 +194,7 @@ class _LoginPageState extends State { hintText: '请输入密码', hintStyle: TextStyle( color: ColorUtil.Color_153_153_153, - fontSize: 14) + fontSize: 14.sp) ), ), ), @@ -201,20 +204,20 @@ class _LoginPageState extends State { Visibility( visible: state.pageState.value == 0 ? false : true, child: Container( - width: 280, - height: 40, + width: 280.w, + height: 40.h, margin: const EdgeInsets.only(top: 30), padding: const EdgeInsets.only(left: 12, right: 12), decoration: BoxDecoration( borderRadius: const BorderRadius.all(Radius.circular(99)), border: Border.all( - width: 1, + width: 1.w, color: ColorUtil.Color_153_153_153 ), ), child: TextField( style: TextStyle( - fontSize: 14, + fontSize: 14.sp, ), decoration: InputDecoration( contentPadding: EdgeInsets.all(0), @@ -222,7 +225,7 @@ class _LoginPageState extends State { hintText: '请输入会议号', hintStyle: TextStyle( color: ColorUtil.Color_153_153_153, - fontSize: 14) + fontSize: 14.sp) ), ), ), @@ -230,50 +233,50 @@ class _LoginPageState extends State { /// 相关协议 Container( - width: 280, + width: 280.w, margin: const EdgeInsets.only(top: 16), child: Row( children: [ GestureDetector( child: Image.asset( - state.checkAgreementState.value == 0 ? 'assets/images/login_agreement_select_n.png' : 'assets/images/login_agreement_select_y.png', - width: 16, - height: 16, + state.checkAgreementBool.value == false ? 'assets/images/login_agreement_select_n.png' : 'assets/images/login_agreement_select_y.png', + width: 16.w, + height: 16.h, ), onTap: (){ - if(state.checkAgreementState.value == 0){ - logic.changeAgreementState(1); + if(state.checkAgreementBool.value == false){ + logic.changeAgreementState(true); }else{ - logic.changeAgreementState(0); + logic.changeAgreementState(false); } }, ), - const SizedBox(width: 6), - const Text( + SizedBox(width: 6.w), + Text( '我阅读并同意', style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: ColorUtil.Color_153_153_153, ), ), - const Text( + Text( '《服务协议》', style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: ColorUtil.Color_153_153_153, ), ), - const Text( + Text( '和', style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: ColorUtil.Color_153_153_153, ), ), - const Text( + Text( '《隐私政策》', style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: ColorUtil.Color_153_153_153, ), ) @@ -284,8 +287,8 @@ class _LoginPageState extends State { /// 按钮 GestureDetector( child: Container( - width: 280, - height: 44, + width: 280.w, + height: 44.h, margin: const EdgeInsets.only(top: 50), decoration: const BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(99)), @@ -295,13 +298,13 @@ class _LoginPageState extends State { child: Text( state.pageState.value == 0 ? '登录' : '加入会议', style: TextStyle( - fontSize: 16, + fontSize: 16.sp, color: Colors.white, ), ), ), onTap: (){ - Get.toNamed("/startPage"); + Get.toNamed(Routes.startPage); }, ) ], diff --git a/wgshare/lib/pages/metting/meeting_main_binding.dart b/wgshare/lib/pages/metting/meeting_main_binding.dart new file mode 100644 index 0000000..a7f2236 --- /dev/null +++ b/wgshare/lib/pages/metting/meeting_main_binding.dart @@ -0,0 +1,10 @@ +import 'package:get/get.dart'; + +import 'meeting_main_logic.dart'; + +class MeetingMainBinding extends Bindings { + @override + void dependencies() { + Get.lazyPut(() => MeetingMainLogic()); + } +} diff --git a/wgshare/lib/pages/metting/meeting_main_logic.dart b/wgshare/lib/pages/metting/meeting_main_logic.dart new file mode 100644 index 0000000..d2959b7 --- /dev/null +++ b/wgshare/lib/pages/metting/meeting_main_logic.dart @@ -0,0 +1,22 @@ +import 'package:get/get.dart'; + +import 'meeting_main_state.dart'; + +class MeetingMainLogic extends GetxController { + final MeetingMainState state = MeetingMainState(); + + /// 改变会议信息浮层显示状态 + void changeMeetingInfoState(bool isShow){ + state.isShowMeetingInfoFloatingLayer.value = isShow; + } + + /// 改变音频选择浮层显示状态 + void changeMeetingAudioState(bool isShow){ + state.isShowMeetingAudioFloatingLayer.value = isShow; + } + + /// 改变当前页面状态 + void changePageState(int pageState){ + state.pageState.value = pageState; + } +} diff --git a/wgshare/lib/pages/metting/meeting_main_state.dart b/wgshare/lib/pages/metting/meeting_main_state.dart new file mode 100644 index 0000000..4bf9e11 --- /dev/null +++ b/wgshare/lib/pages/metting/meeting_main_state.dart @@ -0,0 +1,21 @@ +import 'package:flutter/cupertino.dart'; +import 'package:get/get.dart'; +import 'package:get/get_rx/src/rx_types/rx_types.dart'; + +class MeetingMainState { + MeetingMainState() { + ///Initialize variables + } + + /// 是否显示会议信息浮层 + late RxBool isShowMeetingInfoFloatingLayer = false.obs; + + /// 是否显示音频选择浮层 + late RxBool isShowMeetingAudioFloatingLayer = false.obs; + + /// 聊天弹窗中Listview控制器 + late ScrollController chatController = ScrollController(); + + /// 当前页面状态,0:语音,1:视频,2,共享 + late RxInt pageState = 0.obs; +} diff --git a/wgshare/lib/pages/metting/meeting_main_view.dart b/wgshare/lib/pages/metting/meeting_main_view.dart new file mode 100644 index 0000000..0959825 --- /dev/null +++ b/wgshare/lib/pages/metting/meeting_main_view.dart @@ -0,0 +1,1237 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:wgshare/pages/metting/share/meeting_main_share_view.dart'; +import 'package:wgshare/pages/metting/video/meeting_main_video_view.dart'; +import 'package:wgshare/utils/toast_utils.dart'; + +import '../../utils/color_util.dart'; +import '../../utils/cus_behavior.dart'; +import 'meeting_main_logic.dart'; +import 'meeting_main_state.dart'; +import 'voice/meeting_main_voice_view.dart'; + +class MeetingMainPage extends StatelessWidget { + MeetingMainPage({Key? key}) : super(key: key); + + final MeetingMainLogic logic = Get.put(MeetingMainLogic()); + final MeetingMainState state = Get.find().state; + + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + surfaceTintColor: ColorUtil.Color_41_41_41, + elevation: 0, + toolbarHeight: 0, + systemOverlayStyle: const SystemUiOverlayStyle( + statusBarColor: Colors.transparent, + systemNavigationBarColor: ColorUtil.Color_41_41_41, + systemNavigationBarIconBrightness: Brightness.light, + statusBarIconBrightness: Brightness.light, + statusBarBrightness: Brightness.light, + ), + backgroundColor: ColorUtil.Color_41_41_41, + ), + body: Stack( + children: [ + Column( + children: [ + /// 顶部布局 + Container( + width: double.infinity, + height: 100.h, + alignment: Alignment.center, + color: ColorUtil.Color_41_41_41, + padding: const EdgeInsets.only(left: 16, right: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + width: 92.w, + child: Row( + children: [ + Image.asset( + 'assets/images/meeting_main_narrow.png', + width: 20.w, + height: 20.h, + ), + SizedBox(width: 16.w), + GestureDetector( + child: Image.asset( + 'assets/images/meeting_main_audio.png', + width: 20.w, + height: 20.h, + ), + onTap: (){ + logic.changeMeetingAudioState(true); + }, + ), + Row( + children: [ + SizedBox(width: 16.w), + Image.asset( + 'assets/images/meeting_main_rotate_camera.png', + width: 20.w, + height: 20.h, + ) + ], + ) + ], + ), + ), + GestureDetector( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + children: [ + Text( + '高三教研数学组', + style: TextStyle( + color: Colors.white, + fontSize: 14.sp, + fontWeight: FontWeight.w500), + ), + SizedBox(width: 4.w), + Image.asset( + 'assets/images/meeting_main_down.png', + width: 16.w, + height: 16.h, + ) + ], + ), + SizedBox(height: 4.h), + Text( + '08:50', + style: TextStyle( + color: Colors.white, + fontSize: 12.sp, + ), + ) + ], + ), + onTap: (){ + logic.changeMeetingInfoState(true); + }, + ), + GestureDetector( + child: Container( + width: 92.w, + alignment: Alignment.centerRight, + child: Image.asset( + 'assets/images/meeting_leave.png', + width: 20.w, + height: 20.h, + ), + ), + onTap: () { + Get.bottomSheet( + isScrollControlled: true, + leaveBottomSheet(context) + ); + }, + ) + ], + ), + ), + + /// 中间布局 + Expanded( + child: Stack( + alignment: Alignment.bottomLeft, + children: [ + + // 语音 + Visibility( + visible: true, + child: MeetingMainVoiceComponent() + ), + + // 视频 + Visibility( + visible: false, + child: MeetingMainVideoComponent() + ), + + // 共享屏幕 + Visibility( + visible: false, + child: MeetingMainShareComponent() + ), + + GestureDetector( + child: Container( + width: 180.w, + height: 40.h, + margin: const EdgeInsets.only(left: 20, bottom: 40), + padding: const EdgeInsets.only(left: 20), + decoration: BoxDecoration( + borderRadius: const BorderRadius.only( + bottomLeft: Radius.circular(56), + topRight: Radius.circular(50), + bottomRight: Radius.circular(50)), + color: ColorUtil.Color_35_35_35_07, + border: Border.all( + width: 1.w, + color: ColorUtil.Color_99_111_158 + ), + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Image.asset( + 'assets/images/meeting_main_chat.png', + width: 18.w, + height: 18.h, + ), + SizedBox(width: 6.w), + Text( + '说点什么...', + style: TextStyle( + fontSize: 14.sp, + color: ColorUtil.Color_156_156_156), + ) + ], + ), + ), + onTap: () { + Get.bottomSheet( + isScrollControlled: true, + chatBottomSheet(context) + ); + Future.delayed(const Duration(milliseconds: 100), () { + state.chatController.jumpTo(state.chatController.position.maxScrollExtent); + }); + }, + ) + ], + ), + ), + + /// 底部布局 + Container( + width: double.infinity, + height: 84.h, + color: ColorUtil.Color_35_35_35, + padding: const EdgeInsets.only(left: 26, right: 26), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + /// 音频 + GestureDetector( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/meeting_main_microphone_default.png', + width: 22.w, + height: 22.h, + ), + SizedBox(height: 4.h), + Text( + ' 静音 ', + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_202_202_202), + ) + ], + ), + onTap: () { + Get.bottomSheet( + isScrollControlled: true, + applySpeakPermissionBottomSheet( + context) + ); + }, + ), + + /// 视频 + GestureDetector( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/meeting_main_camera_default.png', + width: 22.w, + height: 22.h, + ), + SizedBox(height: 4.h), + Text( + '开启视频', + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_202_202_202), + ) + ], + ), + onTap: (){ + ToastUtils.getErrFluttertoast(context: context, msg: '开启视频...'); + }, + ), + + /// 共享 + GestureDetector( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/meeting_main_share_default.png', + width: 22.w, + height: 22.h, + ), + SizedBox(height: 4.h), + Text( + '共享屏幕', + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_202_202_202), + ) + ], + ), + onTap: (){ + ToastUtils.getErrFluttertoast(context: context, msg: '开启共享...'); + }, + ), + + /// 成员 + GestureDetector( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/meeting_main_member_default.png', + width: 22.w, + height: 22.h, + ), + SizedBox(height: 4.h), + Text( + ' 成员 ', + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_202_202_202), + ) + ], + ), + onTap: () { + Get.bottomSheet( + isScrollControlled: true, + queryMemberFloatingLayer(context) + ); + }, + ), + + /// 更多 + /*GestureDetector( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/meeting_main_more_default.png', + width: 22.w, + height: 22.h, + ), + SizedBox(height: 4.h), + Text( + ' 更多 ', + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_202_202_202), + ) + ], + ), + onTap: () {}, + )*/ + ], + ), + ) + ], + ), + meetingInfoFloatingLayer(), + meetingAudioFloatingLayer(), + ], + )); + } + + @override + void dispose() { + Get.delete(); + } + + /// 退出会议底部弹窗 + Widget leaveBottomSheet(BuildContext context) { + return Container( + height: 170.h, + color: ColorUtil.Color_7_9_11, + padding: const EdgeInsets.only(top: 24, bottom: 24, left: 16, right: 16), + child: Column( + children: [ + GestureDetector( + child: Container( + height: 52.h, + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6)), + color: ColorUtil.Color_49_53_58, + ), + alignment: Alignment.center, + child: Text( + '仅自己离开', + style: TextStyle( + fontSize: 16.sp, + color: Colors.white, + ), + ), + ), + onTap: (){ + Get.back(); + Get.back(); + }, + ), + GestureDetector( + child: Container( + height: 52.h, + margin: const EdgeInsets.only(top: 16), + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6)), + color: ColorUtil.Color_16_20_24, + ), + alignment: Alignment.center, + child: Text( + '取消', + style: TextStyle( + fontSize: 16.sp, + color: Colors.white, + ), + ), + ), + onTap: (){ + Get.back(); + }, + ) + ], + ), + ); + } + + /// 会议信息浮层 + Widget meetingInfoFloatingLayer() { + return Obx(() => Visibility( + visible: state.isShowMeetingInfoFloatingLayer.value, + child: Column( + children: [ + Container( + height: 100.h, + color: ColorUtil.Color_0_0_0_0, + ), + Container( + color: ColorUtil.Color_35_35_35, + padding: const EdgeInsets.only(top: 16, bottom: 6), + child: Column( + children: [ + Container( + padding: const EdgeInsets.only(left: 16, right: 16), + margin: const EdgeInsets.only(bottom: 12), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + '高三教研数学组', + style: TextStyle( + fontSize: 14.sp, + fontWeight: FontWeight.w500, + color: ColorUtil.Color_85_117_242), + ), + Row( + children: [ + Image.asset( + 'assets/images/meeting_main_network_normal.png', + width: 14.w, + height: 14.h, + ), + SizedBox(width: 12.w), + Text( + '网络链接正常', + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_202_202_202), + ) + ], + ) + ], + ), + ), + Container( + padding: const EdgeInsets.only(left: 16, right: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + '会议号', + style: TextStyle( + fontSize: 12.sp, + fontWeight: FontWeight.w500, + color: ColorUtil.Color_134_134_134), + ), + Row( + children: [ + Text( + '561564899156', + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_202_202_202, + fontWeight: FontWeight.w500), + ), + SizedBox(width: 12.w), + Image.asset( + 'assets/images/meeting_main_copy.png', + width: 18.w, + height: 18.h, + ) + ], + ) + ], + ), + ), + Container( + width: double.infinity, + height: 1.h, + color: ColorUtil.Color_49_47_47, + margin: const EdgeInsets.only(top: 14, bottom: 14), + ), + Container( + padding: const EdgeInsets.only(left: 16, right: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + '密码', + style: TextStyle( + fontSize: 12.sp, + fontWeight: FontWeight.w500, + color: ColorUtil.Color_134_134_134), + ), + Text( + '5615648', + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_202_202_202, + fontWeight: FontWeight.w500), + ) + ], + ), + ), + Container( + width: double.infinity, + height: 1.h, + color: ColorUtil.Color_49_47_47, + margin: const EdgeInsets.only(top: 14, bottom: 14), + ), + Container( + padding: const EdgeInsets.only(left: 16, right: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + '发起人', + style: TextStyle( + fontSize: 12.sp, + fontWeight: FontWeight.w500, + color: ColorUtil.Color_134_134_134), + ), + Text( + '晓晓', + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_202_202_202, + fontWeight: FontWeight.w500), + ) + ], + ), + ), + Container( + width: double.infinity, + height: 1.h, + color: ColorUtil.Color_49_47_47, + margin: const EdgeInsets.only(top: 14, bottom: 14), + ), + Container( + padding: const EdgeInsets.only(left: 16, right: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + '我的名称', + style: TextStyle( + fontSize: 12.sp, + fontWeight: FontWeight.w500, + color: ColorUtil.Color_134_134_134), + ), + Text( + '晓晓', + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_202_202_202, + fontWeight: FontWeight.w500), + ) + ], + ), + ), + Container( + width: double.infinity, + height: 1.h, + color: ColorUtil.Color_49_47_47, + margin: const EdgeInsets.only(top: 14, bottom: 14), + ), + Container( + padding: const EdgeInsets.only(left: 16, right: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + '参会时长', + style: TextStyle( + fontSize: 12.sp, + fontWeight: FontWeight.w500, + color: ColorUtil.Color_134_134_134), + ), + Text( + '08:50', + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_202_202_202, + fontWeight: FontWeight.w500), + ) + ], + ), + ), + SizedBox(height: 10.h), + GestureDetector( + child: Container( + padding: const EdgeInsets.only(top:10, bottom: 10), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + '收回列表', + style: TextStyle( + fontSize: 10.sp, + color: ColorUtil.Color_202_202_202, + fontWeight: FontWeight.w500), + ), + SizedBox(width: 4.w), + Image.asset( + 'assets/images/meeting_main_info_close.png', + width: 12.w, + height: 10.h, + ) + ], + ), + ), + onTap: (){ + logic.changeMeetingInfoState(false); + }, + ) + ], + ), + ), + Expanded( + child: Container( + color: ColorUtil.Color_57_57_57, + )) + ], + ), + )); + } + + /// 选择音频输出浮层 + Widget meetingAudioFloatingLayer() { + return Obx(() => Visibility( + visible: state.isShowMeetingAudioFloatingLayer.value, + child: Column( + children: [ + Expanded( + child: Container( + color: ColorUtil.Color_57_57_57_08, + )), + Container( + color: ColorUtil.Color_57_57_57_08, + child: Container( + width: double.infinity, + padding: const EdgeInsets.only(top: 16, bottom: 16), + margin: const EdgeInsets.only(left: 40, right: 40), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6)), + border: Border.all(color: ColorUtil.Color_0_0_0_0), + color: ColorUtil.Color_35_35_35, + ), + child: Column( + children: audioList(), + ), + ), + ), + Expanded( + child: Container( + color: ColorUtil.Color_57_57_57_08, + )) + ], + ), + )); + } + + /// 音频列表 + List audioList() { + List audioList = []; + audioList.add( + GestureDetector( + child: Column(children: [ + Text( + '蓝牙设备', + style: TextStyle( + fontSize: 14.sp, + fontWeight: FontWeight.w500, + color: ColorUtil.Color_85_117_242), + ), + Container( + width: double.infinity, + height: 1.h, + color: ColorUtil.Color_49_47_47, + margin: const EdgeInsets.only(top: 14, bottom: 14), + ) + ]), + onTap: (){ + logic.changeMeetingAudioState(false); + }, + ) + ); + audioList.add(Column(children: [ + Text( + '手机听筒', + style: TextStyle(fontSize: 14.sp, color: ColorUtil.Color_134_134_134), + ), + Container( + width: double.infinity, + height: 1.h, + color: ColorUtil.Color_49_47_47, + margin: const EdgeInsets.only(top: 14, bottom: 14), + ) + ])); + audioList.add(Column( + children: [ + Text( + '扬声器', + style: + TextStyle(fontSize: 14.sp, color: ColorUtil.Color_134_134_134), + ) + ], + )); + return audioList; + } + + /// 申请发言权限底部弹窗 + Widget applySpeakPermissionBottomSheet(BuildContext context) { + return Container( + height: 240.h, + color: ColorUtil.Color_7_9_11, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: const EdgeInsets.only(left: 16, right: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox(width: 12.w), + Container( + height: 50.h, + alignment: Alignment.center, + child: Text( + '提示', + style: TextStyle( + fontSize: 14.sp, + fontWeight: FontWeight.w500, + color: ColorUtil.Color_238_238_238), + ), + ), + GestureDetector( + child: Image.asset( + 'assets/images/meeting_main_close_permission.png', + width: 12.w, + height: 12.h, + ), + onTap: (){ + Get.back(); + }, + ) + ], + ), + ), + Container( + width: double.infinity, + height: 1.h, + color: ColorUtil.Color_49_47_47, + ), + Container( + margin: const EdgeInsets.only(top: 20, bottom: 80, left: 16), + child: Text( + '该操作需向管理人申请发言权限', + style: TextStyle( + fontSize: 14.sp, + fontWeight: FontWeight.w600, + color: ColorUtil.Color_238_238_238), + ), + ), + Container( + margin: const EdgeInsets.only(bottom: 20, left: 16, right: 16), + child: Row( + children: [ + Expanded( + child: GestureDetector( + child: Container( + height: 44.h, + margin: const EdgeInsets.only(right: 6), + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(10)), + color: ColorUtil.Color_49_53_58, + ), + alignment: Alignment.center, + child: Text( + '取消', + style: TextStyle( + fontSize: 14.sp, + color: ColorUtil.Color_238_238_238, + ), + ), + ), + onTap: (){ + Get.back(); + }, + ), + ), + Expanded( + child: Container( + height: 44.h, + margin: const EdgeInsets.only(left: 6), + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(10)), + color: ColorUtil.Color_85_117_242, + ), + alignment: Alignment.center, + child: Text( + '申请', + style: TextStyle( + fontSize: 14.sp, + color: ColorUtil.Color_238_238_238, + ), + ), + ), + ) + ], + ), + ) + ], + ), + ); + } + + /// 查看成员浮层 + Widget queryMemberFloatingLayer(BuildContext context) { + return Container( + height: 520.h, + color: ColorUtil.Color_7_9_11, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: const EdgeInsets.only(left: 16, right: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox(width: 12.w), + Container( + height: 50.h, + alignment: Alignment.center, + child: Text( + '成员', + style: TextStyle( + fontSize: 14.sp, + fontWeight: FontWeight.w500, + color: ColorUtil.Color_238_238_238), + ), + ), + GestureDetector( + child: Image.asset( + 'assets/images/meeting_main_close_permission.png', + width: 12.w, + height: 12.h, + ), + onTap: (){ + Get.back(); + }, + ) + ], + ), + ), + Container( + width: double.infinity, + height: 0.5.h, + color: ColorUtil.Color_49_47_47, + ), + Container( + width: double.infinity, + height: 44.h, + margin: const EdgeInsets.only(top: 18, left: 16, right: 16), + padding: const EdgeInsets.only(left: 12, right: 12), + decoration: BoxDecoration( + borderRadius: const BorderRadius.all(Radius.circular(12)), + border: Border.all( + width: 1.w, color: ColorUtil.Color_70_71_73), + ), + child: Row( + children: [ + Image.asset( + 'assets/images/meeting_main_query_member.png', + width: 24.w, + height: 24.h, + ), + SizedBox(width: 8.w), + Expanded( + child: TextField( + style: TextStyle( + fontSize: 14.sp, + color: ColorUtil.Color_235_235_235 + ), + decoration: InputDecoration( + contentPadding: EdgeInsets.all(0), + border: OutlineInputBorder(borderSide: BorderSide.none), + hintText: '输入用户名', + hintStyle: TextStyle( + color: ColorUtil.Color_70_71_73, + fontSize: 14.sp)), + ), + ) + ], + ), + ), + Container( + margin: + const EdgeInsets.only(top: 18, left: 16, right: 16, bottom: 16), + child: Text( + '会议中(2)', + style: TextStyle( + fontSize: 14.sp, + fontWeight: FontWeight.w500, + color: ColorUtil.Color_85_117_242), + ), + ), + Expanded( + child: ScrollConfiguration( + behavior: CusBehavior(), + child: ListView.builder( + itemBuilder: (context, index) { + return Container( + width: double.infinity, + margin: EdgeInsets.only(bottom: index == 9 ? 18 : 0), + child: Column( + children: [ + Container( + padding: const EdgeInsets.only(left: 16, right: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(100), + image: DecorationImage( + fit: BoxFit.cover, + image: NetworkImage( + "https://ts4.cn.mm.bing.net/th?id=OIP-C.QDl_Z7HdQWX_XbVYgBLJLQAAAA&w=250&h=250&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2", + ), + ), + ), + margin: const EdgeInsets.only(right: 8), + width: 36.w, + height: 36.h, + ), + Text( + '晓晓', + style: TextStyle( + fontSize: 14.sp, + fontWeight: FontWeight.w600, + color: ColorUtil.Color_243_243_243), + ), + SizedBox(width: 8.w), + Text( + '主持人', + style: TextStyle( + fontSize: 12.sp, + fontWeight: FontWeight.w500, + color: ColorUtil.Color_2_177_136), + ) + ], + ), + Row( + children: [ + Container( + child: Image.asset( + 'assets/images/meeting_main_share_currently.png', + width: 17.w, + height: 17.h, + ), + ), + Container( + margin: const EdgeInsets.only(left: 12), + child: Image.asset( + 'assets/images/meeting_main_microphone_default.png', + width: 17.w, + height: 17.h, + ), + ), + Container( + margin: const EdgeInsets.only(left: 12), + child: Image.asset( + 'assets/images/meeting_main_camera_default.png', + width: 17.w, + height: 17.h, + ), + ) + ], + ) + ], + ), + ), + Container( + width: double.infinity, + height: 0.5.h, + margin: const EdgeInsets.only(top: 12, bottom: 12), + color: ColorUtil.Color_49_47_47, + ) + ], + ), + ); + }, + itemCount: 10, + ) + ), + ) + ], + ), + ); + } + + /// 聊天底部弹窗 + Widget chatBottomSheet(BuildContext context) { + return Container( + height: 500.h, + color: ColorUtil.Color_35_35_35, + padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: const EdgeInsets.only(left: 16, right: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox(width: 12.w), + Container( + height: 50.h, + alignment: Alignment.center, + child: Text( + '聊天', + style: TextStyle( + fontSize: 14.sp, + fontWeight: FontWeight.w500, + color: ColorUtil.Color_238_238_238), + ), + ), + GestureDetector( + child: Image.asset( + 'assets/images/meeting_main_close_permission.png', + width: 12.w, + height: 12.h, + ), + onTap: (){ + Get.back(); + }, + ) + ], + ), + ), + Container( + width: double.infinity, + height: 0.5.h, + color: ColorUtil.Color_49_47_47, + ), + Expanded( + child: ScrollConfiguration( + behavior: CusBehavior(), + child: ListView.builder( + controller: state.chatController, + itemBuilder: (context, index) { + return index == 0 || index == 2 ? chartItemToOthers(index) : chartItemToOwn(index); + }, + itemCount: 6, + ) + ), + ), + Container( + width: double.infinity, + height: 60.h, + color: ColorUtil.Color_28_28_28, + padding: const EdgeInsets.all(6), + child: Container( + padding: const EdgeInsets.all(12), + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6)), + color: ColorUtil.Color_53_53_53, + ), + child: TextField( + style: TextStyle( + fontSize: 14.sp, + color: ColorUtil.Color_235_235_235 + ), + decoration: InputDecoration( + contentPadding: EdgeInsets.all(0), + border: OutlineInputBorder(borderSide: BorderSide.none), + hintText: '请输入内容...', + hintStyle: TextStyle( + color: ColorUtil.Color_235_235_235, + fontSize: 14.sp)), + ), + ), + ) + ], + ), + ); + } + + /// 聊天浮层-其他人消息 + Widget chartItemToOthers(int index){ + return Container( + width: double.infinity, + padding: const EdgeInsets.only(left: 16, right: 16), + margin: EdgeInsets.only(top: 18, bottom: index == 3 ? 18 : 6), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(99), + image: DecorationImage( + fit: BoxFit.cover, + image: NetworkImage( + "https://ts4.cn.mm.bing.net/th?id=OIP-C.QDl_Z7HdQWX_XbVYgBLJLQAAAA&w=250&h=250&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2", + ), + ), + ), + width: 50.w, + height: 50.h, + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: const EdgeInsets.only(left: 6), + child: Text( + '晓晓', + style: TextStyle( + fontSize: 10.sp, + color: ColorUtil.Color_202_202_202), + ), + ), + Container( + margin: const EdgeInsets.only( + left: 6, top: 6, right: 16), + padding: const EdgeInsets.only( + left: 18, right: 18, top: 10, bottom: 10), + decoration: const BoxDecoration( + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular(99), + topRight: Radius.circular(99), + bottomRight: Radius.circular(99)), + color: ColorUtil.Color_53_53_53, + ), + child: Text( + '你好啊...............你好啊...............', + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_235_235_235), + ), + ) + ], + ) + ) + ], + ), + ); + } + + /// 聊天浮层-自己消息 + Widget chartItemToOwn(int index){ + return Container( + width: double.infinity, + padding: const EdgeInsets.only(left: 16, right: 16), + margin: EdgeInsets.only(top: 18, bottom: index == 3 ? 18 : 6), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Container( + margin: const EdgeInsets.only(right: 6), + child: Text( + '晓晓', + style: TextStyle( + fontSize: 10.sp, + color: ColorUtil.Color_202_202_202), + ), + ), + Container( + margin: const EdgeInsets.only( + left: 16, top: 6, right: 6), + padding: const EdgeInsets.only( + left: 18, right: 18, top: 10, bottom: 10), + decoration: const BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(99), + bottomLeft: Radius.circular(99), + bottomRight: Radius.circular(99) + ), + color: ColorUtil.Color_85_117_242, + ), + child: Text( + '你好啊...............你好啊...............', + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_235_235_235), + ), + ) + ], + ) + ), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(99), + image: DecorationImage( + fit: BoxFit.cover, + image: NetworkImage( + "https://ts4.cn.mm.bing.net/th?id=OIP-C.QDl_Z7HdQWX_XbVYgBLJLQAAAA&w=250&h=250&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2", + ), + ), + ), + width: 50.w, + height: 50.h, + ) + ], + ), + ); + } +} diff --git a/wgshare/lib/pages/metting/share/meeting_main_share_binding.dart b/wgshare/lib/pages/metting/share/meeting_main_share_binding.dart new file mode 100644 index 0000000..d5f5309 --- /dev/null +++ b/wgshare/lib/pages/metting/share/meeting_main_share_binding.dart @@ -0,0 +1,10 @@ +import 'package:get/get.dart'; + +import 'meeting_main_share_logic.dart'; + +class MeetingMainShareBinding extends Bindings { + @override + void dependencies() { + Get.lazyPut(() => MeetingMainShareLogic()); + } +} diff --git a/wgshare/lib/pages/metting/share/meeting_main_share_logic.dart b/wgshare/lib/pages/metting/share/meeting_main_share_logic.dart new file mode 100644 index 0000000..a828f44 --- /dev/null +++ b/wgshare/lib/pages/metting/share/meeting_main_share_logic.dart @@ -0,0 +1,7 @@ +import 'package:get/get.dart'; + +import 'meeting_main_share_state.dart'; + +class MeetingMainShareLogic extends GetxController { + final MeetingMainShareState state = MeetingMainShareState(); +} diff --git a/wgshare/lib/pages/metting/share/meeting_main_share_state.dart b/wgshare/lib/pages/metting/share/meeting_main_share_state.dart new file mode 100644 index 0000000..8a4d7bf --- /dev/null +++ b/wgshare/lib/pages/metting/share/meeting_main_share_state.dart @@ -0,0 +1,5 @@ +class MeetingMainShareState { + MeetingMainShareState() { + ///Initialize variables + } +} diff --git a/wgshare/lib/pages/metting/share/meeting_main_share_view.dart b/wgshare/lib/pages/metting/share/meeting_main_share_view.dart new file mode 100644 index 0000000..903b601 --- /dev/null +++ b/wgshare/lib/pages/metting/share/meeting_main_share_view.dart @@ -0,0 +1,137 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../../utils/color_util.dart'; +import 'meeting_main_share_logic.dart'; +import 'meeting_main_share_state.dart'; + +class MeetingMainShareComponent extends StatelessWidget { + MeetingMainShareComponent({Key? key}) : super(key: key); + + final MeetingMainShareLogic logic = Get.put(MeetingMainShareLogic()); + final MeetingMainShareState state = Get.find().state; + + @override + Widget build(BuildContext context) { + return Container( + child: Stack( + alignment: Alignment.center, + children: [ + Container( + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: NetworkImage( + "https://tse4-mm.cn.bing.net/th/id/OIP-C.acWMNnQ04Ks6Bh2b9Zq8XwHaKF?rs=1&pid=ImgDetMain", + ), + ), + )), + Positioned( + bottom: 110, + child: Image.asset( + 'assets/images/meeting_main_hang_up.png', + width: 50.w, + height: 50.h, + ), + ), + Positioned( + top: 16, + right: 16, + child: Container( + height: 30, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + color: ColorUtil.Color_0_0_0_96), + padding: const EdgeInsets.only(left: 12, right: 12), + child: Row( + children: [ + Text( + '正在讲话:', + style: TextStyle( + fontSize: 10.sp, + color: ColorUtil.Color_185_184_184), + ), + Image.asset( + 'assets/images/meeting_main_speak2.png', + width: 20.w, + height: 20.h, + ), + Text( + '晓晓', + style: TextStyle( + fontSize: 10.sp, + color: ColorUtil.Color_185_184_184), + ) + ], + ), + ), + ), + Positioned( + top: 58, + right: 13, + child: Stack( + children: [ + Container( + width: 120.w, + height: 150.h, + padding: const EdgeInsets.only(left: 12, right: 12), + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: NetworkImage( + "https://tse1-mm.cn.bing.net/th/id/OIP-C.hdhK40Dw3yN_2mjNQNqFCgAAAA?w=186&h=186&c=7&r=0&o=5&pid=1.7", + ), + ), + ) + ), + Positioned( + left: 4, + bottom: 4, + child: Row( + children: [ + Image.asset( + 'assets/images/meeting_main_own.png', + width: 20.w, + height: 15.h, + ), + Container( + height: 15, + 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: Row( + children: [ + Image.asset( + 'assets/images/meeting_main_microphone_close.png', + width: 13.w, + height: 14.h, + ), + SizedBox(width: 4.w), + Text( + '晓晓的屏幕', + style: TextStyle( + fontSize: 10.sp, + color: ColorUtil.Color_185_184_184), + ) + ], + ), + ) + ], + ), + ) + ], + ), + ) + ], + ), + ); + } + + @override + void dispose() { + Get.delete(); + } +} diff --git a/wgshare/lib/pages/metting/video/meeting_main_video_binding.dart b/wgshare/lib/pages/metting/video/meeting_main_video_binding.dart new file mode 100644 index 0000000..3aecc46 --- /dev/null +++ b/wgshare/lib/pages/metting/video/meeting_main_video_binding.dart @@ -0,0 +1,10 @@ +import 'package:get/get.dart'; + +import 'meeting_main_video_logic.dart'; + +class MeetingMainVideoBinding extends Bindings { + @override + void dependencies() { + Get.lazyPut(() => MeetingMainVideoLogic()); + } +} diff --git a/wgshare/lib/pages/metting/video/meeting_main_video_logic.dart b/wgshare/lib/pages/metting/video/meeting_main_video_logic.dart new file mode 100644 index 0000000..fa407d1 --- /dev/null +++ b/wgshare/lib/pages/metting/video/meeting_main_video_logic.dart @@ -0,0 +1,7 @@ +import 'package:get/get.dart'; + +import 'meeting_main_video_state.dart'; + +class MeetingMainVideoLogic extends GetxController { + final MeetingMainVideoState state = MeetingMainVideoState(); +} diff --git a/wgshare/lib/pages/metting/video/meeting_main_video_state.dart b/wgshare/lib/pages/metting/video/meeting_main_video_state.dart new file mode 100644 index 0000000..de7557b --- /dev/null +++ b/wgshare/lib/pages/metting/video/meeting_main_video_state.dart @@ -0,0 +1,5 @@ +class MeetingMainVideoState { + MeetingMainVideoState() { + ///Initialize variables + } +} diff --git a/wgshare/lib/pages/metting/video/meeting_main_video_view.dart b/wgshare/lib/pages/metting/video/meeting_main_video_view.dart new file mode 100644 index 0000000..018ffc9 --- /dev/null +++ b/wgshare/lib/pages/metting/video/meeting_main_video_view.dart @@ -0,0 +1,246 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../../utils/color_util.dart'; +import 'meeting_main_video_logic.dart'; +import 'meeting_main_video_state.dart'; + +class MeetingMainVideoComponent extends StatelessWidget { + MeetingMainVideoComponent({Key? key}) : super(key: key); + + final MeetingMainVideoLogic logic = Get.put(MeetingMainVideoLogic()); + final MeetingMainVideoState state = Get.find().state; + + @override + Widget build(BuildContext context) { + return Stack( + alignment: Alignment.center, + children: [ + PageView( + scrollDirection: Axis.horizontal, + reverse: false, + controller: PageController( + initialPage: 0, + viewportFraction: 1, + keepPage: true, + ), + physics: const BouncingScrollPhysics(), + pageSnapping: true, + onPageChanged: (index) { + // 监听事件 + print('index=====$index'); + }, + children: [ + Container( + child: Stack( + alignment: Alignment.center, + children: [ + Container( + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: NetworkImage( + "https://tse4-mm.cn.bing.net/th/id/OIP-C.acWMNnQ04Ks6Bh2b9Zq8XwHaKF?rs=1&pid=ImgDetMain", + ), + ), + )), + Positioned( + bottom: 110, + child: Image.asset( + 'assets/images/meeting_main_hang_up.png', + width: 50.w, + height: 50.h, + ), + ), + Positioned( + top: 16, + right: 16, + child: Container( + height: 30, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + color: ColorUtil.Color_0_0_0_96), + padding: const EdgeInsets.only(left: 12, right: 12), + child: Row( + children: [ + Text( + '正在讲话:', + style: TextStyle( + fontSize: 10.sp, + color: ColorUtil.Color_185_184_184), + ), + Image.asset( + 'assets/images/meeting_main_speak2.png', + width: 20.w, + height: 20.h, + ), + Text( + '晓晓', + style: TextStyle( + fontSize: 10.sp, + color: ColorUtil.Color_185_184_184), + ) + ], + ), + ), + ), + Positioned( + top: 58, + right: 13, + child: Stack( + children: [ + Container( + width: 120.w, + height: 150.h, + padding: const EdgeInsets.only(left: 12, right: 12), + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: NetworkImage( + "https://tse1-mm.cn.bing.net/th/id/OIP-C.hdhK40Dw3yN_2mjNQNqFCgAAAA?w=186&h=186&c=7&r=0&o=5&pid=1.7", + ), + ), + ) + ), + Positioned( + left: 4, + bottom: 4, + child: Row( + children: [ + Image.asset( + 'assets/images/meeting_main_own.png', + width: 20.w, + height: 15.h, + ), + Container( + height: 15, + 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: Row( + children: [ + Image.asset( + 'assets/images/meeting_main_microphone_close.png', + width: 13.w, + height: 14.h, + ), + SizedBox(width: 4.w), + Text( + '晓晓', + style: TextStyle( + fontSize: 10.sp, + color: ColorUtil.Color_185_184_184), + ) + ], + ), + ) + ], + ), + ) + ], + ), + ) + ], + ), + ), + Container( + color: ColorUtil.Color_57_57_57, + child: GridView.builder( + gridDelegate: + SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + childAspectRatio: 0.8, + crossAxisSpacing: 0), + itemCount: 5, + itemBuilder: (BuildContext ctx, index) { + return Stack( + children: [ + Container( + padding: const EdgeInsets.only(left: 12, right: 12), + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: NetworkImage( + "https://tse1-mm.cn.bing.net/th/id/OIP-C.hdhK40Dw3yN_2mjNQNqFCgAAAA?w=186&h=186&c=7&r=0&o=5&pid=1.7", + ), + ), + ) + ), + Positioned( + left: 4, + bottom: 4, + child: Row( + children: [ + Image.asset( + 'assets/images/meeting_main_own.png', + width: 20.w, + height: 15.h, + ), + Container( + height: 15, + 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: Row( + children: [ + Image.asset( + 'assets/images/meeting_main_microphone_close.png', + width: 13.w, + height: 14.h, + ), + SizedBox(width: 4.w), + Text( + '晓晓', + style: TextStyle( + fontSize: 10.sp, + color: ColorUtil.Color_185_184_184), + ) + ], + ), + ) + ], + ), + ) + ], + ); + }), + ), + ], + ), + Positioned( + bottom: 16, + child: Row( + children: [ + Container( + width: 8.w, + height: 8.h, + margin: const EdgeInsets.only(right: 6), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + color: ColorUtil.Color_255_255_255), + ), + Container( + width: 8.w, + height: 8.h, + margin: const EdgeInsets.only(left: 6), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + color: ColorUtil.Color_108_108_108), + ) + ], + ), + ), + ], + ); + } + + @override + void dispose() { + Get.delete(); + } +} diff --git a/wgshare/lib/pages/metting/voice/meeting_main_voice_binding.dart b/wgshare/lib/pages/metting/voice/meeting_main_voice_binding.dart new file mode 100644 index 0000000..9aa8599 --- /dev/null +++ b/wgshare/lib/pages/metting/voice/meeting_main_voice_binding.dart @@ -0,0 +1,10 @@ +import 'package:get/get.dart'; + +import 'meeting_main_voice_logic.dart'; + +class MeetingMainVoiceBinding extends Bindings { + @override + void dependencies() { + Get.lazyPut(() => MeetingMainVoiceLogic()); + } +} diff --git a/wgshare/lib/pages/metting/voice/meeting_main_voice_logic.dart b/wgshare/lib/pages/metting/voice/meeting_main_voice_logic.dart new file mode 100644 index 0000000..957ab07 --- /dev/null +++ b/wgshare/lib/pages/metting/voice/meeting_main_voice_logic.dart @@ -0,0 +1,7 @@ +import 'package:get/get.dart'; + +import 'meeting_main_voice_state.dart'; + +class MeetingMainVoiceLogic extends GetxController { + final MeetingMainVoiceState state = MeetingMainVoiceState(); +} diff --git a/wgshare/lib/pages/metting/voice/meeting_main_voice_state.dart b/wgshare/lib/pages/metting/voice/meeting_main_voice_state.dart new file mode 100644 index 0000000..701ba72 --- /dev/null +++ b/wgshare/lib/pages/metting/voice/meeting_main_voice_state.dart @@ -0,0 +1,5 @@ +class MeetingMainVoiceState { + MeetingMainVoiceState() { + ///Initialize variables + } +} diff --git a/wgshare/lib/pages/metting/voice/meeting_main_voice_view.dart b/wgshare/lib/pages/metting/voice/meeting_main_voice_view.dart new file mode 100644 index 0000000..06b21f7 --- /dev/null +++ b/wgshare/lib/pages/metting/voice/meeting_main_voice_view.dart @@ -0,0 +1,75 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../../utils/color_util.dart'; +import '../../../utils/cus_behavior.dart'; +import 'meeting_main_voice_logic.dart'; +import 'meeting_main_voice_state.dart'; + +class MeetingMainVoiceComponent extends StatelessWidget { + MeetingMainVoiceComponent({Key? key}) : super(key: key); + + final MeetingMainVoiceLogic logic = Get.put(MeetingMainVoiceLogic()); + final MeetingMainVoiceState state = Get.find().state; + + @override + Widget build(BuildContext context) { + return Container( + alignment: Alignment.center, + padding: const EdgeInsets.only(left: 22, right: 22), + color: ColorUtil.Color_57_57_57, + child: ScrollConfiguration( + behavior: CusBehavior(), + child: GridView.builder( + gridDelegate: + SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 3, + childAspectRatio: 0.7, + crossAxisSpacing: 20), + itemCount: 15, + itemBuilder: (BuildContext ctx, index) { + return Column( + children: [ + SizedBox(height: 20.h), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(99), + image: DecorationImage( + fit: BoxFit.cover, + image: NetworkImage( + "https://ts4.cn.mm.bing.net/th?id=OIP-C.QDl_Z7HdQWX_XbVYgBLJLQAAAA&w=250&h=250&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2", + ), + ), + ), + width: 76.w, + height: 76.h, + ), + SizedBox(height: 6.h), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/meeting_main_speak1.png', + width: 22.w, + height: 22.h, + ), + Text( + '张三啊', + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_255_255_255), + ) + ], + ), + ], + ); + })), + ); + } + + @override + void dispose() { + Get.delete(); + } +} diff --git a/wgshare/lib/pages/start_page.dart b/wgshare/lib/pages/start_page.dart index 9df208c..f37dc6a 100644 --- a/wgshare/lib/pages/start_page.dart +++ b/wgshare/lib/pages/start_page.dart @@ -8,7 +8,7 @@ import 'package:wgshare/common/models/user_info_detail.dart'; import 'package:wgshare/common/store/user_store.dart'; import 'package:wgshare/pages/homePage/home_logic.dart'; import 'package:wgshare/pages/userPage/user_logic.dart'; -import 'package:wgshare/pages/userPage/user_page.dart'; +import 'package:wgshare/pages/userPage/user_view.dart'; import 'package:wgshare/utils/toast_utils.dart'; import '../utils/color_util.dart'; @@ -94,35 +94,35 @@ class _StartPageState extends State with RequestToolMixin { label: '首页', icon: Image.asset( 'assets/images/home_index_select_n.png', - width: 22, - height: 22, + width: 22.w, + height: 22.h, ), activeIcon: Image.asset( 'assets/images/home_index_select_y.png', - width: 22, - height: 22, + width: 22.w, + height: 22.h, ), ), BottomNavigationBarItem( label: '我的', icon: Image.asset( 'assets/images/home_user_select_n.png', - width: 22, - height: 22, + width: 22.w, + height: 22.h, ), activeIcon: Image.asset( 'assets/images/home_user_select_y.png', - width: 22, - height: 22, + width: 22.w, + height: 22.h, ), ), ], //设置显示的模式 type: BottomNavigationBarType.fixed, backgroundColor: Colors.white, - selectedFontSize: 14, + selectedFontSize: 14.sp, selectedItemColor: ColorUtil.Color_85_117_242, - unselectedFontSize: 14, + unselectedFontSize: 14.sp, unselectedItemColor: ColorUtil.Color_80_87_103, //设置当前的索引 currentIndex: _pageController._pageIndexState.pageIndex.value, diff --git a/wgshare/lib/pages/userPage/user_page.dart b/wgshare/lib/pages/userPage/user_view.dart similarity index 83% rename from wgshare/lib/pages/userPage/user_page.dart rename to wgshare/lib/pages/userPage/user_view.dart index abe8e2a..6968c15 100644 --- a/wgshare/lib/pages/userPage/user_page.dart +++ b/wgshare/lib/pages/userPage/user_view.dart @@ -1,7 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:wgshare/utils/my_text.dart'; - +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:wgshare/main.dart'; +import 'package:wgshare/pages/userPage/user_logic.dart'; import '../../utils/color_util.dart'; class UserPage extends StatefulWidget { @@ -11,13 +13,13 @@ class UserPage extends StatefulWidget { State createState() => UserPageState(); } -class UserPageState extends State with AutomaticKeepAliveClientMixin { - @override - bool get wantKeepAlive => true; +class UserPageState extends State { + + final logic = Get.find(); + final state = Get.find().state; @override Widget build(BuildContext context) { - super.build(context); return Scaffold( appBar: AppBar( surfaceTintColor: Colors.white, @@ -38,13 +40,13 @@ class UserPageState extends State with AutomaticKeepAliveClientMixin { children: [ Container( width: double.infinity, - height: 44, + height: 44.h, color: Colors.white, alignment: Alignment.center, child: Text( '我的', style: TextStyle( - fontSize: 16, + fontSize: 16.sp, color: ColorUtil.Color_51_51_51, fontWeight: FontWeight.w500 ), @@ -71,15 +73,15 @@ class UserPageState extends State with AutomaticKeepAliveClientMixin { ), ), ), - width: 132, - height: 132, + width: 132.w, + height: 132.h, ), ), Container( child: Text( '晓晓', style: TextStyle( - fontSize: 16, + fontSize: 16.sp, fontWeight: FontWeight.w500, color: ColorUtil.Color_85_117_242 ), @@ -94,7 +96,7 @@ class UserPageState extends State with AutomaticKeepAliveClientMixin { Text( '名称', style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: ColorUtil.Color_134_134_134 ), ), @@ -104,15 +106,15 @@ class UserPageState extends State with AutomaticKeepAliveClientMixin { Text( '晓晓', style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: ColorUtil.Color_51_51_51 ), ), - const SizedBox(width: 12), + SizedBox(width: 12.w), Image.asset( 'assets/images/user_right.png', - width: 10, - height: 10, + width: 10.w, + height: 10.h, ) ], ), @@ -121,7 +123,7 @@ class UserPageState extends State with AutomaticKeepAliveClientMixin { ), Container( width: double.infinity, - height: 1, + height: 1.h, color: ColorUtil.Color_230_230_230, margin: const EdgeInsets.only(top: 12, left: 16, right: 16), ), @@ -135,7 +137,7 @@ class UserPageState extends State with AutomaticKeepAliveClientMixin { Text( '登录密码', style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: ColorUtil.Color_134_134_134 ), ), @@ -145,15 +147,15 @@ class UserPageState extends State with AutomaticKeepAliveClientMixin { Text( '********', style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: ColorUtil.Color_51_51_51 ), ), - const SizedBox(width: 12), + SizedBox(width: 12.w), Image.asset( 'assets/images/user_right.png', - width: 10, - height: 10, + width: 10.w, + height: 10.h, ) ], ), @@ -162,7 +164,7 @@ class UserPageState extends State with AutomaticKeepAliveClientMixin { ), Container( width: double.infinity, - height: 1, + height: 1.h, color: ColorUtil.Color_230_230_230, margin: const EdgeInsets.only(top: 12, left: 16, right: 16), ), @@ -172,18 +174,18 @@ class UserPageState extends State with AutomaticKeepAliveClientMixin { ), Container( - width: 280, - height: 44, + width: 280.w, + height: 44.h, margin: const EdgeInsets.only(top: 40), decoration: const BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(99)), color: ColorUtil.Color_85_117_242, ), alignment: Alignment.center, - child: const Text( + child: Text( '退出登录', style: TextStyle( - fontSize: 16, + fontSize: 16.sp, color: Colors.white, ), ), @@ -193,4 +195,10 @@ class UserPageState extends State with AutomaticKeepAliveClientMixin { ) ); } + + @override + void dispose() { + Get.delete(); + super.dispose(); + } } diff --git a/wgshare/lib/routes/app_pages.dart b/wgshare/lib/routes/app_pages.dart index b1a9fd4..3fbf11c 100644 --- a/wgshare/lib/routes/app_pages.dart +++ b/wgshare/lib/routes/app_pages.dart @@ -3,17 +3,20 @@ import 'package:wgshare/pages/homePage/home_binding.dart'; import 'package:wgshare/pages/homePage/home_view.dart'; import 'package:wgshare/pages/loginPage/login_binding.dart'; import 'package:wgshare/pages/loginPage/login_view.dart'; +import 'package:wgshare/pages/metting/meeting_main_binding.dart'; +import 'package:wgshare/pages/metting/meeting_main_view.dart'; import 'package:wgshare/pages/start_page.dart'; import '../pages/userPage/user_binding.dart'; -import '../pages/userPage/user_page.dart'; +import '../pages/userPage/user_view.dart'; import 'app_routes.dart'; abstract class AppPages { static final pages = [ + GetPage(name: Routes.loginPage, page: () => const LoginPage(), binding: LoginBinding(), transition: Transition.noTransition), GetPage(name: Routes.startPage, page: () => const StartPage(), binding: StartPageBinding(), transition: Transition.noTransition), GetPage(name: Routes.homePage, page: () => const HomePage(), binding: HomeBinding(), transition: Transition.noTransition), GetPage(name: Routes.userPage, page: () => const UserPage(), binding: UserBinding(), transition: Transition.noTransition), - GetPage(name: Routes.loginPage, page: () => const LoginPage(), binding: LoginBinding(), transition: Transition.noTransition), + GetPage(name: Routes.meetingMainPage, page: () => MeetingMainPage(), binding: MeetingMainBinding(), transition: Transition.noTransition), ]; } diff --git a/wgshare/lib/routes/app_routes.dart b/wgshare/lib/routes/app_routes.dart index 914e947..eda487c 100644 --- a/wgshare/lib/routes/app_routes.dart +++ b/wgshare/lib/routes/app_routes.dart @@ -1,7 +1,17 @@ // part of 'app_pages.dart'; abstract class Routes { - static const loginPage = '/loginPage'; //登录 - static const startPage = '/startPage'; //TAB页面 - static const homePage = '/homePage'; //首页 - static const userPage = '/userPage'; //我的 + // 登录 + static const loginPage = '/loginPage'; + + // TAB页面 + static const startPage = '/startPage'; + + // 首页 + static const homePage = '/homePage'; + + // 我的 + static const userPage = '/userPage'; + + // 会议首页 + static const meetingMainPage = '/meetingMainPage'; } diff --git a/wgshare/lib/utils/color_util.dart b/wgshare/lib/utils/color_util.dart index e8204b4..75d3adf 100644 --- a/wgshare/lib/utils/color_util.dart +++ b/wgshare/lib/utils/color_util.dart @@ -67,6 +67,8 @@ class ColorUtil { static const Color_230_230_230 = Color.fromRGBO(230, 230, 230, 1); + static const Color_99_111_158 = Color.fromRGBO(99, 111, 158, 1); + /// 十六进制颜色, /// hex, 十六进制值,例如:0xffffff, /// alpha, 透明度 [0.0,1.0] diff --git a/wgshare/lib/utils/cus_behavior.dart b/wgshare/lib/utils/cus_behavior.dart new file mode 100644 index 0000000..fc3ef9f --- /dev/null +++ b/wgshare/lib/utils/cus_behavior.dart @@ -0,0 +1,13 @@ +import 'dart:io'; + +import 'package:flutter/widgets.dart'; + +/// 隐藏List和Grid水波纹 +class CusBehavior extends ScrollBehavior { + @override + Widget buildOverscrollIndicator( + BuildContext context, Widget child, ScrollableDetails details) { + if (Platform.isAndroid || Platform.isFuchsia) return child; + return super.buildOverscrollIndicator(context, child, details); + } +}