From acd421121c7a07da106cf9f0d05b4a6b84dc2bdf Mon Sep 17 00:00:00 2001 From: lxm <1274844347@qq.com> Date: Mon, 2 Mar 2026 15:04:20 +0800 Subject: [PATCH] =?UTF-8?q?style(meeting):=20=E7=BB=9F=E4=B8=80=E6=9A=97?= =?UTF-8?q?=E9=BB=91=E6=A8=A1=E5=BC=8F=E9=80=82=E9=85=8D=E5=8F=8A=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E9=A2=9C=E8=89=B2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 优化 MeetingUIUtils 组件中暗黑模式下背景色和卡片阴影颜色 - 在多处底部弹窗组件中添加暗黑模式判断,统一调整文字、背景、边框等颜色 - AI底部弹窗添加输入框内容监听,控制发送按钮颜色与可点击状态 - 编辑会议标题弹窗按钮色彩及边框根据暗黑模式进行切换 - 筛选抽屉组件使用 MeetingUIUtils 统一文本和背景颜色 - 生成会议弹窗内部多处颜色适配暗黑模式,按钮和选项视觉统一 - 成员底部弹窗界面调整为响应暗黑模式,文字和控件颜色分别适配 - 更多底部弹窗菜单项颜色随暗黑模式切换,禁用状态透明度保持一致 - 录音语言底部弹窗整体颜色调整,列表条目边界颜色支持暗黑模式 - 优化各类控件在暗黑/亮色模式下的切换逻辑,改善用户视觉体验 --- .../meeting/utils/meeting_ui_utils.dart | 24 +- .../views/bottomSheet/ai_bottom_sheet.dart | 63 +- .../bottomSheet/edit_title_bottom_sheet.dart | 206 +++--- .../views/bottomSheet/filtrate_drawer.dart | 51 +- .../bottomSheet/generate_bottom_sheet.dart | 52 +- .../bottomSheet/member_bottom_sheet.dart | 194 ++--- .../views/bottomSheet/more_bottom_sheet.dart | 69 +- .../record_language_bottom_sheet.dart | 109 +-- .../second_level_bottom_sheet.dart | 234 +++--- .../views/bottomSheet/share_bottom_sheet.dart | 25 +- .../bottomSheet/speaker_all_bottom_sheet.dart | 697 +++++++++--------- .../bottomSheet/speaker_bottom_sheet.dart | 297 ++++---- .../meeting/views/meeting_details_view.dart | 50 +- .../meeting/views/tabs/overview_tab.dart | 59 +- .../meeting/views/tabs/speech_tab.dart | 69 +- .../meeting/views/tabs/summary_tab.dart | 59 +- 16 files changed, 1203 insertions(+), 1055 deletions(-) diff --git a/lib/modules/meeting/utils/meeting_ui_utils.dart b/lib/modules/meeting/utils/meeting_ui_utils.dart index 26ccb05a0..9d039ca1e 100644 --- a/lib/modules/meeting/utils/meeting_ui_utils.dart +++ b/lib/modules/meeting/utils/meeting_ui_utils.dart @@ -5,12 +5,12 @@ import 'package:flutter/material.dart'; class MeetingUIUtils { /// 获取背景颜色 static Color getBackgroundColor(bool isDarkMode) { - return isDarkMode ? Colors.black : Colors.grey[50]!; + return isDarkMode ? const Color(0xFF121212) : Colors.grey[50]!; } /// 获取卡片背景颜色 static Color getCardColor(bool isDarkMode) { - return isDarkMode ? const Color(0xFF1A1A1A) : Colors.white; + return isDarkMode ? const Color(0xFF2D2D2D) : Colors.white; } /// 获取半透明白色 @@ -35,11 +35,23 @@ class MeetingUIUtils { /// 获取卡片阴影 static List getCardShadow(bool isDarkMode) { + if (isDarkMode) { + return [ + BoxShadow( + color: Colors.black.withValues(alpha: 0.5), + blurRadius: 6, + offset: const Offset(0, 2), + ), + BoxShadow( + color: Colors.white.withValues(alpha: 0.05), + blurRadius: 0, + offset: const Offset(0, -0.5), + ), + ]; + } return [ BoxShadow( - color: isDarkMode - ? Colors.black.withValues(alpha: 0.2) - : Colors.black.withValues(alpha: 0.05), + color: Colors.black.withValues(alpha: 0.05), blurRadius: 10, offset: const Offset(0, 4), ), @@ -60,4 +72,4 @@ class MeetingUIUtils { static Color getDisabledColor(Color color, bool isEnabled) { return isEnabled ? color : color.withValues(alpha: 0.5); } -} \ No newline at end of file +} diff --git a/lib/modules/meeting/views/bottomSheet/ai_bottom_sheet.dart b/lib/modules/meeting/views/bottomSheet/ai_bottom_sheet.dart index 9a63492cb..f65acdcc0 100644 --- a/lib/modules/meeting/views/bottomSheet/ai_bottom_sheet.dart +++ b/lib/modules/meeting/views/bottomSheet/ai_bottom_sheet.dart @@ -39,11 +39,26 @@ class _AIBottomSheetState extends State { bool _isLoading = false; + // 输入框是否有内容 + bool _hasText = false; + @override void initState() { super.initState(); _getAllText(); _getDataList(); + // 监听输入框内容变化 + _textController.addListener(_onTextChanged); + } + + // 输入框内容变化回调 + void _onTextChanged() { + final hasText = _textController.text.isNotEmpty; + if (_hasText != hasText) { + setState(() { + _hasText = hasText; + }); + } } void _getAllText() { @@ -66,6 +81,7 @@ class _AIBottomSheetState extends State { @override void dispose() { + _textController.removeListener(_onTextChanged); _textController.dispose(); _scrollController.dispose(); _aiResponseSubscription?.cancel(); @@ -74,6 +90,7 @@ class _AIBottomSheetState extends State { @override Widget build(BuildContext context) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return SafeArea( top: false, child: Container( @@ -93,7 +110,7 @@ class _AIBottomSheetState extends State { 'Ask AI', style: TextStyle( fontSize: 16.sp, - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, fontWeight: FontWeight.bold, ), ), @@ -103,7 +120,7 @@ class _AIBottomSheetState extends State { width: 26.w, height: 26.w, decoration: BoxDecoration( - color: Colors.grey[100], + color: isDarkMode ? Colors.grey[700] : Colors.grey[100], borderRadius: BorderRadius.circular(26.r), ), child: Icon( @@ -141,6 +158,7 @@ class _AIBottomSheetState extends State { } Widget _item(int index, Map data) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; List list = []; if (index == 0 && data['cruxtext'].isNotEmpty) { list = data['cruxtext'].split(RegExp(r'[??]')); @@ -154,13 +172,14 @@ class _AIBottomSheetState extends State { child: Container( padding: EdgeInsets.all(10.w), decoration: BoxDecoration( - color: Colors.grey[200], + color: isDarkMode ? Colors.grey[800] : Colors.grey[200], borderRadius: BorderRadius.circular(12.r), ), child: Text( data['user'], style: TextStyle( fontSize: 14.sp, + color: isDarkMode ? Colors.white : Colors.black87, ), ), ), @@ -202,15 +221,20 @@ class _AIBottomSheetState extends State { EdgeInsets.symmetric(horizontal: 15.w, vertical: 8.w), margin: EdgeInsets.symmetric(vertical: 5.w), decoration: BoxDecoration( - color: Colors.grey[100], + color: isDarkMode ? Colors.grey[800] : Colors.grey[100], borderRadius: BorderRadius.circular(12.r), border: Border.all( - color: Colors.grey[300]!, + color: isDarkMode + ? Colors.grey[700]! + : Colors.grey[300]!, ), ), child: Text( '${list[idx]}?', - style: TextStyle(fontSize: 14.sp), + style: TextStyle( + fontSize: 14.sp, + color: isDarkMode ? Colors.white : Colors.black87, + ), ), ), ), @@ -223,6 +247,7 @@ class _AIBottomSheetState extends State { } Widget _empty() { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return Padding( padding: EdgeInsets.symmetric(vertical: 10.w), child: Column( @@ -233,6 +258,7 @@ class _AIBottomSheetState extends State { style: TextStyle( fontSize: 18.sp, fontWeight: FontWeight.bold, + color: isDarkMode ? Colors.white : Colors.black87, ), ), Padding( @@ -266,15 +292,18 @@ class _AIBottomSheetState extends State { padding: EdgeInsets.symmetric(horizontal: 15.w, vertical: 8.w), margin: EdgeInsets.symmetric(vertical: 5.w), decoration: BoxDecoration( - color: Colors.grey[100], + color: isDarkMode ? Colors.grey[800] : Colors.grey[100], borderRadius: BorderRadius.circular(20.r), border: Border.all( - color: Colors.grey[300]!, + color: isDarkMode ? Colors.grey[700]! : Colors.grey[300]!, ), ), child: Text( _cruxList[index], - style: TextStyle(fontSize: 12.sp), + style: TextStyle( + fontSize: 12.sp, + color: isDarkMode ? Colors.white : Colors.black87, + ), ), ), ), @@ -285,6 +314,7 @@ class _AIBottomSheetState extends State { } Widget _inputBox() { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return Container( height: 42.w, padding: EdgeInsets.symmetric(horizontal: 10.w), @@ -295,8 +325,8 @@ class _AIBottomSheetState extends State { begin: Alignment.centerLeft, end: Alignment.centerRight, colors: [ - const Color(0xFFab47bc).withValues(alpha: 0.1), // 薰衣草紫 - const Color(0xFFec407a).withValues(alpha: 0.2), // 品红 + const Color(0xFFab47bc).withValues(alpha: isDarkMode ? 0.2 : 0.1), + const Color(0xFFec407a).withValues(alpha: isDarkMode ? 0.3 : 0.2), ], ), ), @@ -308,7 +338,7 @@ class _AIBottomSheetState extends State { controller: _textController, style: TextStyle( fontSize: 16.sp, - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, letterSpacing: 0, height: 1.4, ), @@ -322,6 +352,7 @@ class _AIBottomSheetState extends State { ), isDense: true, fillColor: Colors.transparent, + focusedBorder: InputBorder.none, border: InputBorder.none, ), onSubmitted: _sendMessage, @@ -330,13 +361,17 @@ class _AIBottomSheetState extends State { 10.horizontalSpace, GestureDetector( onTap: () { - _sendMessage(_textController.text); + if (_hasText || _isLoading) { + _sendMessage(_textController.text); + } }, child: Container( width: 26.w, height: 26.w, decoration: BoxDecoration( - color: _isLoading ? Colors.black87 : Colors.grey, + color: _isLoading + ? Colors.black87 + : (_hasText ? const Color(0xFF2196F3) : Colors.grey), borderRadius: BorderRadius.circular(26.r), ), child: Icon( diff --git a/lib/modules/meeting/views/bottomSheet/edit_title_bottom_sheet.dart b/lib/modules/meeting/views/bottomSheet/edit_title_bottom_sheet.dart index b7e5dad9d..48cad4056 100644 --- a/lib/modules/meeting/views/bottomSheet/edit_title_bottom_sheet.dart +++ b/lib/modules/meeting/views/bottomSheet/edit_title_bottom_sheet.dart @@ -11,6 +11,7 @@ class EditTitleBottomSheet extends GetView { @override Widget build(BuildContext context) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return SafeArea( top: false, child: Padding( @@ -18,125 +19,128 @@ class EditTitleBottomSheet extends GetView { child: Column( mainAxisSize: MainAxisSize.min, children: [ - Container( - padding: EdgeInsets.symmetric(vertical: 10.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - 'editMeetingTitle'.tr, // 编辑会议标题 - style: TextStyle( - fontSize: 16.sp, - color: Colors.black87, - fontWeight: FontWeight.bold, - ), - ), - GestureDetector( - onTap: () => Get.back(), - child: Container( - width: 26.w, - height: 26.w, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(26.r), - ), - child: Icon( - Icons.close, - size: 18.w, - color: Colors.grey[400], + Container( + padding: EdgeInsets.symmetric(vertical: 10.w), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'editMeetingTitle'.tr, // 编辑会议标题 + style: TextStyle( + fontSize: 16.sp, + color: isDarkMode ? Colors.white : Colors.black87, + fontWeight: FontWeight.bold, ), ), - ) - ], + GestureDetector( + onTap: () => Get.back(), + child: Container( + width: 26.w, + height: 26.w, + decoration: BoxDecoration( + color: isDarkMode ? Colors.grey[700] : Colors.white, + borderRadius: BorderRadius.circular(26.r), + ), + child: Icon( + Icons.close, + size: 18.w, + color: Colors.grey[400], + ), + ), + ) + ], + ), ), - ), - Divider( - height: 1, - color: Colors.grey[300], - ), - Container( - margin: EdgeInsets.symmetric(vertical: 20.w), - alignment: Alignment.center, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(12.w), - boxShadow: [ - BoxShadow( - color: Colors.black.withValues(alpha: 0.05), - blurRadius: 10, - offset: const Offset(0, 2), - ), - ], + Divider( + height: 1, + color: isDarkMode ? Colors.grey[700] : Colors.grey[300], ), - child: TextField( - controller: controller.titleController, - style: TextStyle( - color: Colors.black87, - fontSize: 16.sp, + Container( + margin: EdgeInsets.symmetric(vertical: 20.w), + alignment: Alignment.center, + decoration: BoxDecoration( + color: isDarkMode ? const Color(0xFF2D2D2D) : Colors.white, + borderRadius: BorderRadius.circular(12.w), + boxShadow: isDarkMode + ? null + : [ + BoxShadow( + color: Colors.black.withValues(alpha: 0.05), + blurRadius: 10, + offset: const Offset(0, 2), + ), + ], ), - decoration: InputDecoration( - hintText: 'maxCharacters'.tr, - hintStyle: TextStyle( - color: Colors.black54, + child: TextField( + controller: controller.titleController, + style: TextStyle( + color: isDarkMode ? Colors.white : Colors.black87, fontSize: 16.sp, ), - isDense: true, - fillColor: Colors.transparent, - border: InputBorder.none, - contentPadding: EdgeInsets.all(10.w), + decoration: InputDecoration( + hintText: 'maxCharacters'.tr, + hintStyle: TextStyle( + color: isDarkMode ? Colors.grey[500] : Colors.black54, + fontSize: 16.sp, + ), + isDense: true, + fillColor: Colors.transparent, + border: InputBorder.none, + contentPadding: EdgeInsets.all(10.w), + ), ), ), - ), - Padding( - padding: EdgeInsets.only(bottom: 20.w), - child: Row( - children: [ - Expanded( - child: GestureDetector( - onTap: () => Get.back(), - child: Container( - height: 48.w, - alignment: Alignment.center, - decoration: BoxDecoration( - color: Colors.grey[300], - borderRadius: BorderRadius.circular(12.r), - ), - child: Text( - 'cancel'.tr, // 取消 - style: TextStyle( - fontSize: 16.sp, - color: Colors.black, + Padding( + padding: EdgeInsets.only(bottom: 20.w), + child: Row( + children: [ + Expanded( + child: GestureDetector( + onTap: () => Get.back(), + child: Container( + height: 48.w, + alignment: Alignment.center, + decoration: BoxDecoration( + color: + isDarkMode ? Colors.grey[700] : Colors.grey[300], + borderRadius: BorderRadius.circular(12.r), + ), + child: Text( + 'cancel'.tr, // 取消 + style: TextStyle( + fontSize: 16.sp, + color: isDarkMode ? Colors.white : Colors.black, + ), ), ), ), ), - ), - 10.horizontalSpace, - Expanded( - child: GestureDetector( - onTap: () { - controller.editMeetingTitle(id); - }, - child: Container( - height: 48.w, - alignment: Alignment.center, - decoration: BoxDecoration( - color: Colors.black, - borderRadius: BorderRadius.circular(12.r), - ), - child: Text( - 'confirm'.tr, // 确认 - style: TextStyle( - fontSize: 16.sp, - color: Colors.white, + 10.horizontalSpace, + Expanded( + child: GestureDetector( + onTap: () { + controller.editMeetingTitle(id); + }, + child: Container( + height: 48.w, + alignment: Alignment.center, + decoration: BoxDecoration( + color: isDarkMode ? Colors.white : Colors.black, + borderRadius: BorderRadius.circular(12.r), + ), + child: Text( + 'confirm'.tr, // 确认 + style: TextStyle( + fontSize: 16.sp, + color: isDarkMode ? Colors.black : Colors.white, + ), ), ), ), ), - ), - ], + ], + ), ), - ), ], ), ), diff --git a/lib/modules/meeting/views/bottomSheet/filtrate_drawer.dart b/lib/modules/meeting/views/bottomSheet/filtrate_drawer.dart index 6e1258503..6cccc4494 100644 --- a/lib/modules/meeting/views/bottomSheet/filtrate_drawer.dart +++ b/lib/modules/meeting/views/bottomSheet/filtrate_drawer.dart @@ -4,6 +4,7 @@ import 'package:get/get.dart'; import '../../controllers/meeting_controller.dart'; import '../../controllers/meeting_home_controller.dart'; +import '../../utils/meeting_ui_utils.dart'; class FiltrateDrawer extends StatefulWidget { const FiltrateDrawer({super.key}); @@ -18,6 +19,7 @@ class _FiltrateDrawerState extends State { @override Widget build(BuildContext context) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return SafeArea( child: Padding( padding: EdgeInsets.symmetric(horizontal: 12.w), @@ -29,30 +31,33 @@ class _FiltrateDrawerState extends State { margin: EdgeInsets.symmetric(vertical: 15.w), alignment: Alignment.center, decoration: BoxDecoration( - color: Colors.grey[200], + color: isDarkMode + ? MeetingUIUtils.getTranslucentWhite(0.1) + : Colors.grey[200], borderRadius: BorderRadius.circular(12.w), ), child: Row( children: [ Icon( Icons.search, - color: Colors.black87, + color: isDarkMode ? Colors.grey[400] : Colors.black87, size: 20.w, ), Expanded( child: TextField( controller: _homeController.filtrateController, style: TextStyle( - color: Colors.black87, + color: MeetingUIUtils.getTextColor(isDarkMode), fontSize: 14.sp, ), decoration: InputDecoration( hintText: 'searchInAllFiles'.tr, // 对应中文:在所有文件中搜索 hintStyle: TextStyle( - color: Colors.black54, + color: isDarkMode ? Colors.grey[500] : Colors.black54, fontSize: 14.sp, ), isDense: true, + focusedBorder: InputBorder.none, fillColor: Colors.transparent, border: InputBorder.none, contentPadding: EdgeInsets.symmetric(vertical: 10.w), @@ -89,15 +94,11 @@ class _FiltrateDrawerState extends State { padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 10.w), decoration: _homeController.filtrateType.value == '' ? BoxDecoration( - color: Colors.white, + color: isDarkMode + ? MeetingUIUtils.getTranslucentWhite(0.08) + : Colors.white, borderRadius: BorderRadius.circular(12.w), - boxShadow: [ - BoxShadow( - color: Colors.black.withValues(alpha: 0.06), - blurRadius: 10, - offset: const Offset(0, 2), - ), - ], + boxShadow: MeetingUIUtils.getCardShadow(isDarkMode), ) : null, child: Row( @@ -111,7 +112,7 @@ class _FiltrateDrawerState extends State { Text( '${'allFiles'.tr}(${_homeController.originalDataList.length})', // 对应中文:全部文件 style: TextStyle( - color: Colors.black87, + color: MeetingUIUtils.getTextColor(isDarkMode), fontSize: 14.sp, ), ), @@ -123,7 +124,7 @@ class _FiltrateDrawerState extends State { padding: EdgeInsetsGeometry.symmetric(vertical: 15.w), child: Divider( height: 1, - color: Colors.grey[300], + color: isDarkMode ? Colors.grey[800] : Colors.grey[300], ), ), Padding( @@ -131,7 +132,7 @@ class _FiltrateDrawerState extends State { child: Text( 'from'.tr, // 对应中文:来自 style: TextStyle( - color: Colors.grey, + color: isDarkMode ? Colors.grey[500] : Colors.grey, fontSize: 14.sp, fontWeight: FontWeight.bold, ), @@ -150,21 +151,17 @@ class _FiltrateDrawerState extends State { margin: EdgeInsets.symmetric(vertical: 2.w), decoration: _homeController.filtrateType.value == name ? BoxDecoration( - color: Colors.white, + color: isDarkMode + ? MeetingUIUtils.getTranslucentWhite(0.08) + : Colors.white, borderRadius: BorderRadius.circular(12.w), - boxShadow: [ - BoxShadow( - color: Colors.black.withValues(alpha: 0.06), - blurRadius: 10, - offset: const Offset(0, 2), - ), - ], + boxShadow: MeetingUIUtils.getCardShadow(isDarkMode), ) : null, child: Text( name, style: TextStyle( - color: Colors.black87, + color: MeetingUIUtils.getTextColor(isDarkMode), fontSize: 14.sp, ), ), @@ -176,7 +173,7 @@ class _FiltrateDrawerState extends State { child: Text( 'sortBy'.tr, // 对应中文:排序方式 style: TextStyle( - color: Colors.grey, + color: isDarkMode ? Colors.grey[500] : Colors.grey, fontSize: 14.sp, fontWeight: FontWeight.bold, ), @@ -199,7 +196,7 @@ class _FiltrateDrawerState extends State { Text( 'creationTime'.tr, // 对应中文:创建时间 style: TextStyle( - color: Colors.black87, + color: MeetingUIUtils.getTextColor(isDarkMode), fontSize: 14.sp, ), ), @@ -207,7 +204,7 @@ class _FiltrateDrawerState extends State { _homeController.isAsc ? Icons.keyboard_double_arrow_up : Icons.keyboard_double_arrow_down, - color: Colors.grey, + color: isDarkMode ? Colors.grey[500] : Colors.grey, size: 20.w, ), ], diff --git a/lib/modules/meeting/views/bottomSheet/generate_bottom_sheet.dart b/lib/modules/meeting/views/bottomSheet/generate_bottom_sheet.dart index d1f66d982..4ba58efdc 100644 --- a/lib/modules/meeting/views/bottomSheet/generate_bottom_sheet.dart +++ b/lib/modules/meeting/views/bottomSheet/generate_bottom_sheet.dart @@ -88,6 +88,7 @@ class _GenerateBottomSheetState extends State { @override Widget build(BuildContext context) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return SafeArea( top: false, child: Column( @@ -111,7 +112,7 @@ class _GenerateBottomSheetState extends State { _controller.meetingData.value.title, style: TextStyle( fontSize: 16.sp, - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, ), ), Text( @@ -130,7 +131,7 @@ class _GenerateBottomSheetState extends State { width: 26.w, height: 26.w, decoration: BoxDecoration( - color: Colors.white, + color: isDarkMode ? Colors.grey[700] : Colors.white, borderRadius: BorderRadius.circular(26.r), ), child: Icon( @@ -148,7 +149,7 @@ class _GenerateBottomSheetState extends State { margin: EdgeInsets.only(bottom: 10.w), child: Divider( height: 1, - color: Colors.grey[300], + color: isDarkMode ? Colors.grey[700] : Colors.grey[300], ), ), Padding( @@ -160,7 +161,7 @@ class _GenerateBottomSheetState extends State { 'selectSummaryTemplate'.tr, // 对应中文:选择总结模版 style: TextStyle( fontSize: 14.sp, - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, ), ), ), @@ -258,13 +259,14 @@ class _GenerateBottomSheetState extends State { Container( margin: EdgeInsets.symmetric(horizontal: 12.w), decoration: BoxDecoration( - color: Colors.white, + color: isDarkMode ? const Color(0xFF2D2D2D) : Colors.white, borderRadius: BorderRadius.circular(8.r), ), child: Column( children: [ _row( 'speakerIdentification'.tr, // 对应中文:区分说话人 + isDarkMode: isDarkMode, widget: Transform.scale( scale: 0.8, alignment: Alignment.centerRight, @@ -281,11 +283,13 @@ class _GenerateBottomSheetState extends State { _row( 'recordingLanguage'.tr, // 对应中文:录音语言 value: _formlanguageText, + isDarkMode: isDarkMode, onTap: () { Get.bottomSheet( RecordLanguageBottomSheet(_formlanguage), isScrollControlled: true, - backgroundColor: Colors.grey[100], + backgroundColor: + isDarkMode ? Colors.grey[850] : Colors.grey[100], shape: RoundedRectangleBorder( borderRadius: BorderRadius.vertical( top: Radius.circular(12.r), @@ -305,11 +309,13 @@ class _GenerateBottomSheetState extends State { 'targetLanguage'.tr, // 对应中文:目标语言 value: _tolanguageText, isBorder: false, + isDarkMode: isDarkMode, onTap: () { Get.bottomSheet( RecordLanguageBottomSheet(_tolanguage), isScrollControlled: true, - backgroundColor: Colors.grey[100], + backgroundColor: + isDarkMode ? Colors.grey[850] : Colors.grey[100], shape: RoundedRectangleBorder( borderRadius: BorderRadius.vertical( top: Radius.circular(12.r), @@ -362,14 +368,14 @@ class _GenerateBottomSheetState extends State { height: 48.w, alignment: Alignment.center, decoration: BoxDecoration( - color: Colors.black, + color: isDarkMode ? Colors.white : Colors.black, borderRadius: BorderRadius.circular(12.r), ), child: Text( 'meetingGenerateNow'.tr, // 对应中文:立即生成 style: TextStyle( fontSize: 16.sp, - color: Colors.white, + color: isDarkMode ? Colors.black : Colors.white, ), ), ), @@ -381,6 +387,7 @@ class _GenerateBottomSheetState extends State { } Widget _item(Map data) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return Container( width: 200.w, margin: EdgeInsets.symmetric(horizontal: 8.w), @@ -399,7 +406,7 @@ class _GenerateBottomSheetState extends State { Container( padding: EdgeInsets.all(5.w), decoration: BoxDecoration( - color: Colors.white, + color: isDarkMode ? const Color(0xFF2D2D2D) : Colors.white, gradient: _templateData['id'] == data['id'] ? const LinearGradient( colors: [Colors.blue, Colors.pinkAccent], @@ -413,7 +420,7 @@ class _GenerateBottomSheetState extends State { padding: EdgeInsets.all(10.w), decoration: BoxDecoration( borderRadius: BorderRadius.circular(10.w), - color: Colors.white, + color: isDarkMode ? const Color(0xFF2D2D2D) : Colors.white, ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -432,7 +439,7 @@ class _GenerateBottomSheetState extends State { data['name'], style: TextStyle( fontSize: 16.sp, - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, fontWeight: FontWeight.bold, ), ), @@ -447,14 +454,18 @@ class _GenerateBottomSheetState extends State { padding: EdgeInsets.symmetric( horizontal: 5.w, vertical: 2.w), decoration: BoxDecoration( - color: Colors.grey[200], + color: isDarkMode + ? Colors.grey[800] + : Colors.grey[200], borderRadius: BorderRadius.circular(4.r), ), child: Text( data['tag'][idx], style: TextStyle( fontSize: 10.sp, - color: Colors.grey[600], + color: isDarkMode + ? Colors.grey[400] + : Colors.grey[600], ), ), ); @@ -466,7 +477,9 @@ class _GenerateBottomSheetState extends State { overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 12.sp, - color: Colors.grey[600], + color: isDarkMode + ? Colors.grey[400] + : Colors.grey[600], ), ), ], @@ -527,6 +540,7 @@ class _GenerateBottomSheetState extends State { String? value, Widget? widget, bool isBorder = true, + bool isDarkMode = false, Function()? onTap, }) { return GestureDetector( @@ -540,7 +554,7 @@ class _GenerateBottomSheetState extends State { border: isBorder ? Border( bottom: BorderSide( - color: Colors.grey[300]!, + color: isDarkMode ? Colors.grey[700]! : Colors.grey[300]!, ), ) : null, @@ -552,7 +566,7 @@ class _GenerateBottomSheetState extends State { title, style: TextStyle( fontSize: 14.sp, - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, ), ), ), @@ -566,9 +580,9 @@ class _GenerateBottomSheetState extends State { color: Colors.grey, ), ), - const Icon( + Icon( Icons.keyboard_arrow_right, - color: Colors.grey, + color: isDarkMode ? Colors.grey[500] : Colors.grey, ) ], ), diff --git a/lib/modules/meeting/views/bottomSheet/member_bottom_sheet.dart b/lib/modules/meeting/views/bottomSheet/member_bottom_sheet.dart index 807d3385f..3475d7b8e 100644 --- a/lib/modules/meeting/views/bottomSheet/member_bottom_sheet.dart +++ b/lib/modules/meeting/views/bottomSheet/member_bottom_sheet.dart @@ -9,6 +9,7 @@ class MemberBottomSheet extends StatelessWidget { @override Widget build(BuildContext context) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return SafeArea( top: false, child: Container( @@ -27,118 +28,129 @@ class MemberBottomSheet extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - Container( - margin: EdgeInsets.only(top: 12.w), - alignment: Alignment.centerRight, - child: GestureDetector( - onTap: () => Get.back(), - child: Container( - width: 26.w, - height: 26.w, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(26.r), - ), - child: Icon( - Icons.close, - size: 18.w, - color: Colors.grey[400], + Container( + margin: EdgeInsets.only(top: 12.w), + alignment: Alignment.centerRight, + child: GestureDetector( + onTap: () => Get.back(), + child: Container( + width: 26.w, + height: 26.w, + decoration: BoxDecoration( + color: isDarkMode ? Colors.grey[700] : Colors.white, + borderRadius: BorderRadius.circular(26.r), + ), + child: Icon( + Icons.close, + size: 18.w, + color: isDarkMode ? Colors.grey[300] : Colors.grey[400], + ), ), ), ), - ), - Text( - '解锁 Starter 会员', - style: TextStyle( - color: Colors.black87, - fontSize: 18.sp, - fontWeight: FontWeight.bold, - ), - ), - Padding( - padding: EdgeInsets.only(top: 5.w, bottom: 20.w), - child: Text( - '绑定 VOITRANS 设备可激活 Starter 会员权益,解锁:', + Text( + '解锁 Starter 会员', style: TextStyle( - color: Colors.grey, - fontSize: 14.sp, + color: isDarkMode ? Colors.white : Colors.black87, + fontSize: 18.sp, + fontWeight: FontWeight.bold, ), ), - ), - _item(Icons.access_time, Colors.red, - 'monthlyTranscriptionDuration'.tr), //对应中文:每月300分钟转写时长 - _item(Icons.description, Colors.purpleAccent, - 'industrySpecificSummaryTemplate'.tr), //对应中文:为行业细分场景设计的专业总结模版 - _item(Icons.auto_awesome, Colors.purpleAccent, - 'autopilotTemplateSummary'.tr), //对应中文:Autopilot 模版自动总结 - _item(Icons.people, Colors.red, - 'distinguishDifferentSpeakers'.tr), //对应中文:区分不同说话人 - _item(Icons.cloud_upload, Colors.red, - 'importAudioFromAppWeb'.tr), //对应中文:从APP、WEB导入音频进行转写和总结 - Padding( - padding: EdgeInsets.symmetric(vertical: 20.w), - child: Row( - children: [ - Expanded( - child: GestureDetector( - onTap: () { - Get.to( - () => const WebViewPage( - url: 'https://web.voitrans.net', - title: 'Voitrans', - ), - ); - }, - child: Container( - height: 48.w, - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12.r), - border: Border.all( - color: Colors.grey[400]!, + Padding( + padding: EdgeInsets.only(top: 5.w, bottom: 20.w), + child: Text( + '绑定 VOITRANS 设备可激活 Starter 会员权益,解锁:', + style: TextStyle( + color: Colors.grey, + fontSize: 14.sp, + ), + ), + ), + _item( + Icons.access_time, + Colors.red, + 'monthlyTranscriptionDuration'.tr, + isDarkMode), //对应中文:每月300分钟转写时长 + _item( + Icons.description, + Colors.purpleAccent, + 'industrySpecificSummaryTemplate'.tr, + isDarkMode), //对应中文:为行业细分场景设计的专业总结模版 + _item( + Icons.auto_awesome, + Colors.purpleAccent, + 'autopilotTemplateSummary'.tr, + isDarkMode), //对应中文:Autopilot 模版自动总结 + _item(Icons.people, Colors.red, 'distinguishDifferentSpeakers'.tr, + isDarkMode), //对应中文:区分不同说话人 + _item(Icons.cloud_upload, Colors.red, 'importAudioFromAppWeb'.tr, + isDarkMode), //对应中文:从APP、WEB导入音频进行转写和总结 + Padding( + padding: EdgeInsets.symmetric(vertical: 20.w), + child: Row( + children: [ + Expanded( + child: GestureDetector( + onTap: () { + Get.to( + () => const WebViewPage( + url: 'https://web.voitrans.net', + title: 'Voitrans', + ), + ); + }, + child: Container( + height: 48.w, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12.r), + border: Border.all( + color: isDarkMode + ? Colors.grey[600]! + : Colors.grey[400]!, + ), ), - ), - child: Text( - 'findMore'.tr, //对应中文:发现更多 - style: TextStyle( - fontSize: 16.sp, - color: Colors.black, + child: Text( + 'findMore'.tr, //对应中文:发现更多 + style: TextStyle( + fontSize: 16.sp, + color: isDarkMode ? Colors.white : Colors.black, + ), ), ), ), ), - ), - 10.horizontalSpace, - Expanded( - child: GestureDetector( - onTap: () {}, - child: Container( - height: 48.w, - alignment: Alignment.center, - decoration: BoxDecoration( - color: Colors.black, - borderRadius: BorderRadius.circular(12.r), - ), - child: Text( - 'bindImmediately'.tr, //对应中文:立即绑定 - style: TextStyle( - fontSize: 16.sp, - color: Colors.white, + 10.horizontalSpace, + Expanded( + child: GestureDetector( + onTap: () {}, + child: Container( + height: 48.w, + alignment: Alignment.center, + decoration: BoxDecoration( + color: isDarkMode ? Colors.white : Colors.black, + borderRadius: BorderRadius.circular(12.r), + ), + child: Text( + 'bindImmediately'.tr, //对应中文:立即绑定 + style: TextStyle( + fontSize: 16.sp, + color: isDarkMode ? Colors.black : Colors.white, + ), ), ), ), ), - ), - ], + ], + ), ), - ), ], ), ), ); } - Widget _item(IconData icon, Color color, String title) { + Widget _item(IconData icon, Color color, String title, bool isDarkMode) { return Padding( padding: EdgeInsets.symmetric(vertical: 10.w), child: Row( @@ -164,7 +176,7 @@ class MemberBottomSheet extends StatelessWidget { child: Text( title, style: TextStyle( - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, fontSize: 14.sp, fontWeight: FontWeight.bold, ), diff --git a/lib/modules/meeting/views/bottomSheet/more_bottom_sheet.dart b/lib/modules/meeting/views/bottomSheet/more_bottom_sheet.dart index e72b4de89..f294b3e82 100644 --- a/lib/modules/meeting/views/bottomSheet/more_bottom_sheet.dart +++ b/lib/modules/meeting/views/bottomSheet/more_bottom_sheet.dart @@ -19,6 +19,7 @@ class _MoreBottomSheetState extends State { @override Widget build(BuildContext context) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return SafeArea( top: false, child: Padding( @@ -26,34 +27,37 @@ class _MoreBottomSheetState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - SizedBox(height: 10.w), - _shareItem(Icons.refresh, 'reSummarize'.tr, //重新总结 - onTap: _detailsController.meetingDetails.value.tasktype >= 5 && - _detailsController.meetingDetails.value.tasktype < 10002 - ? () { - Get.back(); - Get.bottomSheet( - const GenerateBottomSheet( - isSummarizeAgain: true, - ), - isScrollControlled: true, - backgroundColor: Colors.grey[100], - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.vertical( - top: Radius.circular(12.r), + SizedBox(height: 10.w), + _shareItem(Icons.refresh, 'reSummarize'.tr, //重新总结 + isDarkMode: isDarkMode, + onTap: _detailsController.meetingDetails.value.tasktype >= 5 && + _detailsController.meetingDetails.value.tasktype < 10002 + ? () { + Get.back(); + Get.bottomSheet( + const GenerateBottomSheet( + isSummarizeAgain: true, ), - ), - ); - } - : null), - _shareItem(Icons.delete_outline, 'delete'.tr, onTap: () async { - _controller.deleteMeeting( - _detailsController.meetingData.value.id, - _detailsController.meetingData.value.filepath, - ); - Get.back(); - Get.back(); - }), + isScrollControlled: true, + backgroundColor: + isDarkMode ? Colors.grey[850] : Colors.grey[100], + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.vertical( + top: Radius.circular(12.r), + ), + ), + ); + } + : null), + _shareItem(Icons.delete_outline, 'delete'.tr, + isDarkMode: isDarkMode, onTap: () async { + _controller.deleteMeeting( + _detailsController.meetingData.value.id, + _detailsController.meetingData.value.filepath, + ); + Get.back(); + Get.back(); + }), ], ), ), @@ -64,6 +68,7 @@ class _MoreBottomSheetState extends State { IconData icon, String title, { VoidCallback? onTap, + bool isDarkMode = false, }) { return InkWell( onTap: onTap, @@ -71,7 +76,9 @@ class _MoreBottomSheetState extends State { padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 14.w), margin: EdgeInsets.only(bottom: 10.w), decoration: BoxDecoration( - color: onTap != null ? Colors.white : Colors.grey[200], + color: onTap != null + ? (isDarkMode ? const Color(0xFF2D2D2D) : Colors.white) + : (isDarkMode ? Colors.grey[800] : Colors.grey[200]), borderRadius: BorderRadius.circular(12.r), ), child: Row( @@ -80,7 +87,7 @@ class _MoreBottomSheetState extends State { opacity: onTap != null ? 1.0 : 0.5, child: Icon( icon, - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, ), ), 10.horizontalSpace, @@ -89,8 +96,8 @@ class _MoreBottomSheetState extends State { title, style: TextStyle( fontSize: 14.sp, - color: - Colors.black87.withValues(alpha: onTap != null ? 1 : 0.5), + color: (isDarkMode ? Colors.white : Colors.black87) + .withValues(alpha: onTap != null ? 1 : 0.5), ), ), ), diff --git a/lib/modules/meeting/views/bottomSheet/record_language_bottom_sheet.dart b/lib/modules/meeting/views/bottomSheet/record_language_bottom_sheet.dart index 6d8fcf4c8..dcd0f3e01 100644 --- a/lib/modules/meeting/views/bottomSheet/record_language_bottom_sheet.dart +++ b/lib/modules/meeting/views/bottomSheet/record_language_bottom_sheet.dart @@ -29,6 +29,7 @@ class _RecordLanguageBottomSheetState extends State { @override Widget build(BuildContext context) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return SafeArea( top: false, child: Padding( @@ -36,67 +37,67 @@ class _RecordLanguageBottomSheetState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - Container( - padding: EdgeInsets.symmetric(vertical: 10.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - 'recordLanguage'.tr, // 对应中文:录音语言 - style: TextStyle( - fontSize: 16.sp, - color: Colors.black87, - fontWeight: FontWeight.bold, - ), - ), - GestureDetector( - onTap: () => Get.back(), - child: Container( - width: 26.w, - height: 26.w, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(26.r), - ), - child: Icon( - Icons.close, - size: 18.w, - color: Colors.grey[400], + Container( + padding: EdgeInsets.symmetric(vertical: 10.w), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'recordLanguage'.tr, // 对应中文:录音语言 + style: TextStyle( + fontSize: 16.sp, + color: isDarkMode ? Colors.white : Colors.black87, + fontWeight: FontWeight.bold, ), ), - ) - ], - ), - ), - Divider( - height: 1, - color: Colors.grey[300], - ), - Container( - margin: EdgeInsets.symmetric(vertical: 20.w), - constraints: BoxConstraints( - maxHeight: 1.sh - 180.w, + GestureDetector( + onTap: () => Get.back(), + child: Container( + width: 26.w, + height: 26.w, + decoration: BoxDecoration( + color: isDarkMode ? Colors.grey[700] : Colors.white, + borderRadius: BorderRadius.circular(26.r), + ), + child: Icon( + Icons.close, + size: 18.w, + color: isDarkMode ? Colors.grey[300] : Colors.grey[400], + ), + ), + ) + ], + ), ), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.r), + Divider( + height: 1, + color: isDarkMode ? Colors.grey[700] : Colors.grey[300], ), - child: ListView.builder( - itemCount: _languages.length, - shrinkWrap: true, - itemBuilder: (BuildContext context, int index) { - Map data = _languages[index]; - return _item(index, data); - }, + Container( + margin: EdgeInsets.symmetric(vertical: 20.w), + constraints: BoxConstraints( + maxHeight: 1.sh - 180.w, + ), + decoration: BoxDecoration( + color: isDarkMode ? const Color(0xFF2D2D2D) : Colors.white, + borderRadius: BorderRadius.circular(8.r), + ), + child: ListView.builder( + itemCount: _languages.length, + shrinkWrap: true, + itemBuilder: (BuildContext context, int index) { + Map data = _languages[index]; + return _item(index, data, isDarkMode); + }, + ), ), - ), ], ), ), ); } - Widget _item(int index, Map data) { + Widget _item(int index, Map data, bool isDarkMode) { return GestureDetector( onTap: () { Get.back(result: data); @@ -110,7 +111,7 @@ class _RecordLanguageBottomSheetState extends State { border: index != 0 ? Border( top: BorderSide( - color: Colors.grey[300]!, + color: isDarkMode ? Colors.grey[700]! : Colors.grey[300]!, ), ) : null, @@ -122,14 +123,14 @@ class _RecordLanguageBottomSheetState extends State { data['name'], style: TextStyle( fontSize: 14.sp, - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, ), ), ), if (widget.language == data['value']) - const Icon( + Icon( Icons.check, - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, ), ], ), diff --git a/lib/modules/meeting/views/bottomSheet/second_level_bottom_sheet.dart b/lib/modules/meeting/views/bottomSheet/second_level_bottom_sheet.dart index 7b1fe93cf..4f4e174eb 100644 --- a/lib/modules/meeting/views/bottomSheet/second_level_bottom_sheet.dart +++ b/lib/modules/meeting/views/bottomSheet/second_level_bottom_sheet.dart @@ -21,6 +21,7 @@ class _SecondLevelBottomSheetState extends State { @override Widget build(BuildContext context) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return SafeArea( top: false, child: Padding( @@ -29,136 +30,139 @@ class _SecondLevelBottomSheetState extends State { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - padding: EdgeInsets.symmetric(vertical: 10.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - widget.title, - style: TextStyle( - fontSize: 16.sp, - color: Colors.black87, - fontWeight: FontWeight.bold, - ), - ), - GestureDetector( - onTap: () => Get.back(), - child: Container( - width: 26.w, - height: 26.w, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(26.r), - ), - child: Icon( - Icons.close, - size: 18.w, - color: Colors.grey[400], + Container( + padding: EdgeInsets.symmetric(vertical: 10.w), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + widget.title, + style: TextStyle( + fontSize: 16.sp, + color: isDarkMode ? Colors.white : Colors.black87, + fontWeight: FontWeight.bold, ), ), - ) - ], + GestureDetector( + onTap: () => Get.back(), + child: Container( + width: 26.w, + height: 26.w, + decoration: BoxDecoration( + color: isDarkMode ? Colors.grey[700] : Colors.white, + borderRadius: BorderRadius.circular(26.r), + ), + child: Icon( + Icons.close, + size: 18.w, + color: isDarkMode ? Colors.grey[300] : Colors.grey[400], + ), + ), + ) + ], + ), ), - ), - Divider( - height: 1, - color: Colors.grey[300], - ), - Padding( - padding: EdgeInsetsGeometry.only( - top: 20.w, - bottom: 10.w, - left: 12.w, + Divider( + height: 1, + color: isDarkMode ? Colors.grey[700] : Colors.grey[300], ), - child: Text( - widget.subtitle, - style: TextStyle( - fontSize: 14.sp, - color: Colors.grey[600], + Padding( + padding: EdgeInsetsGeometry.only( + top: 20.w, + bottom: 10.w, + left: 12.w, + ), + child: Text( + widget.subtitle, + style: TextStyle( + fontSize: 14.sp, + color: Colors.grey[600], + ), ), ), - ), - Container( - clipBehavior: Clip.hardEdge, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(12.r), - ), - child: Column( - children: List.generate(widget.children.length, (int index) { - Map item = widget.children[index]; - return InkWell( - onTap: () { - setState(() { - _selectedIndex = index; - }); - }, - child: Container( - padding: - EdgeInsets.symmetric(horizontal: 12.w, vertical: 14.w), - decoration: BoxDecoration( - border: item['isBorder'] - ? Border( - bottom: BorderSide( - width: 0.5, - color: Colors.grey[300]!, + Container( + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + color: isDarkMode ? const Color(0xFF2D2D2D) : Colors.white, + borderRadius: BorderRadius.circular(12.r), + ), + child: Column( + children: List.generate(widget.children.length, (int index) { + Map item = widget.children[index]; + return InkWell( + onTap: () { + setState(() { + _selectedIndex = index; + }); + }, + child: Container( + padding: EdgeInsets.symmetric( + horizontal: 12.w, vertical: 14.w), + decoration: BoxDecoration( + border: item['isBorder'] + ? Border( + bottom: BorderSide( + width: 0.5, + color: isDarkMode + ? Colors.grey[700]! + : Colors.grey[300]!, + ), + ) + : null, + ), + child: Row( + children: [ + Icon( + item['icon'], + color: isDarkMode ? Colors.white : Colors.black87, + ), + 10.horizontalSpace, + Expanded( + child: Text( + item['title'], + style: TextStyle( + fontSize: 14.sp, + color: + isDarkMode ? Colors.white : Colors.black87, ), - ) - : null, - ), - child: Row( - children: [ - Icon( - item['icon'], - color: Colors.black87, - ), - 10.horizontalSpace, - Expanded( - child: Text( - item['title'], - style: TextStyle( - fontSize: 14.sp, - color: Colors.black87, ), ), - ), - if (_selectedIndex == index) - const Icon( - Icons.check, - color: Colors.black87, - ), - ], + if (_selectedIndex == index) + Icon( + Icons.check, + color: isDarkMode ? Colors.white : Colors.black87, + ), + ], + ), ), - ), - ); - }), + ); + }), + ), ), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 20.w), - child: GestureDetector( - onTap: () { - Get.back(); - widget.onTap(_selectedIndex); - }, - child: Container( - height: 48.w, - alignment: Alignment.center, - decoration: BoxDecoration( - color: Colors.black, - borderRadius: BorderRadius.circular(12.r), - ), - child: Text( - 'export'.tr, // 对应中文:导出 - style: TextStyle( - fontSize: 16.sp, - color: Colors.white, + Padding( + padding: EdgeInsets.symmetric(vertical: 20.w), + child: GestureDetector( + onTap: () { + Get.back(); + widget.onTap(_selectedIndex); + }, + child: Container( + height: 48.w, + alignment: Alignment.center, + decoration: BoxDecoration( + color: isDarkMode ? Colors.white : Colors.black, + borderRadius: BorderRadius.circular(12.r), + ), + child: Text( + 'export'.tr, // 对应中文:导出 + style: TextStyle( + fontSize: 16.sp, + color: isDarkMode ? Colors.black : Colors.white, + ), ), ), ), ), - ), ], ), ), diff --git a/lib/modules/meeting/views/bottomSheet/share_bottom_sheet.dart b/lib/modules/meeting/views/bottomSheet/share_bottom_sheet.dart index 8727ab100..d89ea03c5 100644 --- a/lib/modules/meeting/views/bottomSheet/share_bottom_sheet.dart +++ b/lib/modules/meeting/views/bottomSheet/share_bottom_sheet.dart @@ -30,6 +30,7 @@ class _ShareBottomSheetState extends State { @override Widget build(BuildContext context) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return SafeArea( top: false, child: Padding( @@ -52,7 +53,7 @@ class _ShareBottomSheetState extends State { _controller.meetingData.value.title, style: TextStyle( fontSize: 16.sp, - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, ), ), ), @@ -62,7 +63,7 @@ class _ShareBottomSheetState extends State { width: 26.w, height: 26.w, decoration: BoxDecoration( - color: Colors.white, + color: isDarkMode ? Colors.grey[700] : Colors.white, borderRadius: BorderRadius.circular(26.r), ), child: Icon( @@ -204,7 +205,9 @@ class _ShareBottomSheetState extends State { ], ), isScrollControlled: true, - backgroundColor: Colors.grey[100], + backgroundColor: isDarkMode + ? Colors.grey[850] + : Colors.grey[100], shape: RoundedRectangleBorder( borderRadius: BorderRadius.vertical( top: Radius.circular(12.r), @@ -281,11 +284,12 @@ class _ShareBottomSheetState extends State { } Widget _box(List children) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return Container( margin: EdgeInsets.only(bottom: 10.w), clipBehavior: Clip.hardEdge, decoration: BoxDecoration( - color: Colors.white, + color: isDarkMode ? const Color(0xFF2D2D2D) : Colors.white, borderRadius: BorderRadius.circular(12.r), ), child: Column( @@ -300,17 +304,20 @@ class _ShareBottomSheetState extends State { bool isBorder = true, VoidCallback? onTap, }) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return InkWell( onTap: onTap, child: Container( padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 14.w), decoration: BoxDecoration( - color: onTap != null ? null : Colors.grey[200], + color: onTap != null + ? null + : (isDarkMode ? Colors.grey[800] : Colors.grey[200]), border: isBorder ? Border( bottom: BorderSide( width: 0.5, - color: Colors.grey[300]!, + color: isDarkMode ? Colors.grey[700]! : Colors.grey[300]!, ), ) : null, @@ -321,7 +328,7 @@ class _ShareBottomSheetState extends State { opacity: onTap != null ? 1.0 : 0.5, child: Icon( icon, - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, ), ), 10.horizontalSpace, @@ -330,8 +337,8 @@ class _ShareBottomSheetState extends State { title, style: TextStyle( fontSize: 14.sp, - color: - Colors.black87.withValues(alpha: onTap != null ? 1 : 0.5), + color: (isDarkMode ? Colors.white : Colors.black87) + .withValues(alpha: onTap != null ? 1 : 0.5), ), ), ), diff --git a/lib/modules/meeting/views/bottomSheet/speaker_all_bottom_sheet.dart b/lib/modules/meeting/views/bottomSheet/speaker_all_bottom_sheet.dart index d637fc125..d8ec9816a 100644 --- a/lib/modules/meeting/views/bottomSheet/speaker_all_bottom_sheet.dart +++ b/lib/modules/meeting/views/bottomSheet/speaker_all_bottom_sheet.dart @@ -89,6 +89,7 @@ class _SpeakerAllBottomSheetState extends State { @override Widget build(BuildContext context) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return SafeArea( top: false, child: Padding( @@ -96,399 +97,419 @@ class _SpeakerAllBottomSheetState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - Container( - padding: EdgeInsets.symmetric(vertical: 10.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - 'nameSpeaker'.tr, // 对应中文:命名发言者 - style: TextStyle( - fontSize: 16.sp, - color: Colors.black87, - fontWeight: FontWeight.bold, - ), - ), - GestureDetector( - onTap: () => Get.back(), - child: Container( - width: 26.w, - height: 26.w, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(26.r), - ), - child: Icon( - Icons.close, - size: 18.w, - color: Colors.grey[400], + Container( + padding: EdgeInsets.symmetric(vertical: 10.w), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'nameSpeaker'.tr, // 对应中文:命名发言者 + style: TextStyle( + fontSize: 16.sp, + color: isDarkMode ? Colors.white : Colors.black87, + fontWeight: FontWeight.bold, ), ), - ) - ], - ), - ), - Divider( - height: 1, - color: Colors.grey[300], - ), - Container( - constraints: BoxConstraints( - maxHeight: - 1.sh - 240.w - MediaQuery.of(context).viewInsets.bottom, - ), - child: ListView.builder( - itemCount: _dataList.length, - shrinkWrap: true, - itemBuilder: (BuildContext context, int index) { - Map item = _dataList[index]; - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.only(top: 15.w), - alignment: Alignment.center, + GestureDetector( + onTap: () => Get.back(), + child: Container( + width: 26.w, + height: 26.w, decoration: BoxDecoration( - color: Colors.white, - borderRadius: item['isShow'] && _speakerList.isNotEmpty - ? BorderRadius.vertical( - top: Radius.circular(12.r), - ) - : BorderRadius.circular(12.r), + color: isDarkMode ? Colors.grey[700] : Colors.white, + borderRadius: BorderRadius.circular(26.r), ), - child: Focus( - onFocusChange: (bool hasFocus) { - setState(() { - item['isShow'] = hasFocus; - }); - }, - child: TextField( - controller: item['speakerText'], - style: TextStyle( - fontSize: 16.sp, - color: Colors.black87, - letterSpacing: 0, - height: 1.4, - ), - decoration: InputDecoration( - hintText: item['speaker'], - hintStyle: TextStyle( + child: Icon( + Icons.close, + size: 18.w, + color: isDarkMode ? Colors.grey[300] : Colors.grey[400], + ), + ), + ) + ], + ), + ), + Divider( + height: 1, + color: isDarkMode ? Colors.grey[700] : Colors.grey[300], + ), + Container( + constraints: BoxConstraints( + maxHeight: + 1.sh - 240.w - MediaQuery.of(context).viewInsets.bottom, + ), + child: ListView.builder( + itemCount: _dataList.length, + shrinkWrap: true, + itemBuilder: (BuildContext context, int index) { + Map item = _dataList[index]; + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(top: 15.w), + alignment: Alignment.center, + decoration: BoxDecoration( + color: isDarkMode + ? const Color(0xFF2D2D2D) + : Colors.white, + borderRadius: + item['isShow'] && _speakerList.isNotEmpty + ? BorderRadius.vertical( + top: Radius.circular(12.r), + ) + : BorderRadius.circular(12.r), + ), + child: Focus( + onFocusChange: (bool hasFocus) { + setState(() { + item['isShow'] = hasFocus; + }); + }, + child: TextField( + controller: item['speakerText'], + style: TextStyle( fontSize: 16.sp, - color: Colors.grey[400], + color: isDarkMode ? Colors.white : Colors.black87, letterSpacing: 0, height: 1.4, ), - isDense: true, - fillColor: Colors.transparent, - border: InputBorder.none, - contentPadding: EdgeInsets.symmetric( - horizontal: 10.w, - vertical: 12.w, + decoration: InputDecoration( + hintText: item['speaker'], + hintStyle: TextStyle( + fontSize: 16.sp, + color: isDarkMode + ? Colors.grey[500] + : Colors.grey[400], + letterSpacing: 0, + height: 1.4, + ), + isDense: true, + fillColor: Colors.transparent, + border: InputBorder.none, + contentPadding: EdgeInsets.symmetric( + horizontal: 10.w, + vertical: 12.w, + ), ), ), ), ), - ), - if (item['isShow'] && _speakerList.isNotEmpty) - Container( - padding: EdgeInsets.only(left: 10.w), - clipBehavior: Clip.hardEdge, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.vertical( - bottom: Radius.circular(12.r), - ), - border: Border( - top: BorderSide( - width: 1, - color: Colors.grey[300]!, + if (item['isShow'] && _speakerList.isNotEmpty) + Container( + padding: EdgeInsets.only(left: 10.w), + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + color: isDarkMode + ? const Color(0xFF2D2D2D) + : Colors.white, + borderRadius: BorderRadius.vertical( + bottom: Radius.circular(12.r), ), - ), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(top: 10.w, bottom: 5.w), - child: Text( - 'recentlyUsedNames'.tr, // 对应中文:最近使用过的名称 - style: TextStyle( - fontSize: 12.sp, - color: Colors.grey[600]!, - ), + border: Border( + top: BorderSide( + width: 1, + color: isDarkMode + ? Colors.grey[700]! + : Colors.grey[300]!, ), ), - Container( - constraints: BoxConstraints( - maxHeight: 150.h, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: + EdgeInsets.only(top: 10.w, bottom: 5.w), + child: Text( + 'recentlyUsedNames'.tr, // 对应中文:最近使用过的名称 + style: TextStyle( + fontSize: 12.sp, + color: Colors.grey[600]!, + ), + ), ), - child: ListView.builder( - itemCount: _speakerList.length, - shrinkWrap: true, - itemBuilder: (BuildContext context, int idx) { - return GestureDetector( - onTap: () { - item['speakerText'].text = - _speakerList[idx]; - FocusScope.of(context).unfocus(); - }, - behavior: HitTestBehavior.translucent, - child: SizedBox( - height: 42.w, - child: Align( - alignment: Alignment.centerLeft, - child: Text( - _speakerList[idx], - style: TextStyle( - fontSize: 14.sp, - color: Colors.black87, + Container( + constraints: BoxConstraints( + maxHeight: 150.h, + ), + child: ListView.builder( + itemCount: _speakerList.length, + shrinkWrap: true, + itemBuilder: (BuildContext context, int idx) { + return GestureDetector( + onTap: () { + item['speakerText'].text = + _speakerList[idx]; + FocusScope.of(context).unfocus(); + }, + behavior: HitTestBehavior.translucent, + child: SizedBox( + height: 42.w, + child: Align( + alignment: Alignment.centerLeft, + child: Text( + _speakerList[idx], + style: TextStyle( + fontSize: 14.sp, + color: isDarkMode + ? Colors.white + : Colors.black87, + ), ), ), ), - ), - ); - }, + ); + }, + ), ), - ), - ], + ], + ), ), - ), - Padding( - padding: EdgeInsets.symmetric( - horizontal: 10.w, - vertical: 8.w, - ), - child: Row( - children: [ - Text( - 'totalTime'.tr, // 对应中文:总计 - style: TextStyle( - fontSize: 12.sp, - color: Colors.grey, + Padding( + padding: EdgeInsets.symmetric( + horizontal: 10.w, + vertical: 8.w, + ), + child: Row( + children: [ + Text( + 'totalTime'.tr, // 对应中文:总计 + style: TextStyle( + fontSize: 12.sp, + color: Colors.grey, + ), ), - ), - 5.horizontalSpace, - Text( - '${item['totaltime'] / 1000}s', - style: TextStyle( - fontSize: 12.sp, - color: Colors.black87, + 5.horizontalSpace, + Text( + '${item['totaltime'] / 1000}s', + style: TextStyle( + fontSize: 12.sp, + color: isDarkMode + ? Colors.white70 + : Colors.black87, + ), ), - ), - ], + ], + ), ), - ), - ...List.generate( - item['list'].length, - (int idx) { - Map data = item['list'][idx]; - return Obx(() { - bool isActive = false; - if (_controller.speakerAllStarttime.value == - data['starttime'] && - _controller.speakerAllEndtime.value == - data['endtime']) { - isActive = true; - } - return GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - if (isActive) { - _controller.playerController.pausePlayer(); - _controller.speakerAllStarttime.value = -1; - _controller.speakerAllEndtime.value = -1; - } else { - _controller.speakerAllStarttime.value = - data['starttime']; - _controller.speakerAllEndtime.value = - data['endtime']; - _controller.playerController - .seekTo(data['starttime']); - _controller.playerController.startPlayer(); - } - }, - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 10.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Icon( - isActive - ? Icons.pause_circle - : Icons.play_circle, - color: Colors.red[400], - size: 15.w, - ), - 2.horizontalSpace, - Text( - DateUtil.formatDateMs( - data['starttime'], - format: 'HH:mm:ss', - isUtc: true, + ...List.generate( + item['list'].length, + (int idx) { + Map data = item['list'][idx]; + return Obx(() { + bool isActive = false; + if (_controller.speakerAllStarttime.value == + data['starttime'] && + _controller.speakerAllEndtime.value == + data['endtime']) { + isActive = true; + } + return GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: () { + if (isActive) { + _controller.playerController.pausePlayer(); + _controller.speakerAllStarttime.value = -1; + _controller.speakerAllEndtime.value = -1; + } else { + _controller.speakerAllStarttime.value = + data['starttime']; + _controller.speakerAllEndtime.value = + data['endtime']; + _controller.playerController + .seekTo(data['starttime']); + _controller.playerController.startPlayer(); + } + }, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 10.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Icon( + isActive + ? Icons.pause_circle + : Icons.play_circle, + color: Colors.red[400], + size: 15.w, ), - style: TextStyle( - color: Colors.grey, - fontSize: 12.sp, - ), - ), - Padding( - padding: EdgeInsets.symmetric( - horizontal: 2.w), - child: Text( - '-', + 2.horizontalSpace, + Text( + DateUtil.formatDateMs( + data['starttime'], + format: 'HH:mm:ss', + isUtc: true, + ), style: TextStyle( color: Colors.grey, fontSize: 12.sp, ), ), - ), - Text( - DateUtil.formatDateMs( - data['endtime'], - format: 'HH:mm:ss', - isUtc: true, + Padding( + padding: EdgeInsets.symmetric( + horizontal: 2.w), + child: Text( + '-', + style: TextStyle( + color: Colors.grey, + fontSize: 12.sp, + ), + ), ), - style: TextStyle( - color: Colors.grey, - fontSize: 12.sp, + Text( + DateUtil.formatDateMs( + data['endtime'], + format: 'HH:mm:ss', + isUtc: true, + ), + style: TextStyle( + color: Colors.grey, + fontSize: 12.sp, + ), ), - ), - 5.horizontalSpace, - Text( - '${(data['endtime'] - data['starttime']) / 1000}s', - style: TextStyle( - color: Colors.black54, - fontSize: 12.sp, + 5.horizontalSpace, + Text( + '${(data['endtime'] - data['starttime']) / 1000}s', + style: TextStyle( + color: isDarkMode + ? Colors.grey[400] + : Colors.black54, + fontSize: 12.sp, + ), ), - ), - if (isActive) - Container( - width: 16.w, - height: 16.w, - margin: EdgeInsets.only(left: 5.w), - alignment: Alignment.center, - clipBehavior: Clip.hardEdge, - decoration: const BoxDecoration(), - child: Transform.scale( - scale: 1.6, - child: Lottie.asset( - 'assets/lottie/sound_effect.json', + if (isActive) + Container( + width: 16.w, + height: 16.w, + margin: EdgeInsets.only(left: 5.w), + alignment: Alignment.center, + clipBehavior: Clip.hardEdge, + decoration: const BoxDecoration(), + child: Transform.scale( + scale: 1.6, + child: Lottie.asset( + 'assets/lottie/sound_effect.json', + ), ), ), + ], + ), + Padding( + padding: + EdgeInsets.symmetric(vertical: 8.w), + child: Text( + data['content'], + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + color: isActive + ? Colors.red + : isDarkMode + ? Colors.grey[400] + : Colors.grey[700], + fontSize: 12.sp, ), - ], - ), - Padding( - padding: - EdgeInsets.symmetric(vertical: 8.w), - child: Text( - data['content'], - overflow: TextOverflow.ellipsis, - maxLines: 2, - style: TextStyle( - color: isActive - ? Colors.red - : Colors.grey[700], - fontSize: 12.sp, ), ), - ), - ], + ], + ), ), - ), - ); - }); - }, - ), - if (item['isOmit']) - Padding( - padding: - EdgeInsets.only(left: 10.w, top: 5.w, bottom: 8.w), - child: Row( - children: List.generate( - 6, - (int idx) => Container( - width: 3.w, - height: 3.w, - margin: EdgeInsets.only(right: 3.w), - decoration: BoxDecoration( - color: Colors.grey[700], - borderRadius: BorderRadius.circular(3.r), + ); + }); + }, + ), + if (item['isOmit']) + Padding( + padding: EdgeInsets.only( + left: 10.w, top: 5.w, bottom: 8.w), + child: Row( + children: List.generate( + 6, + (int idx) => Container( + width: 3.w, + height: 3.w, + margin: EdgeInsets.only(right: 3.w), + decoration: BoxDecoration( + color: Colors.grey[700], + borderRadius: BorderRadius.circular(3.r), + ), ), ), ), ), + Padding( + padding: EdgeInsets.only(top: 7.w), + child: _separator(), ), - Padding( - padding: EdgeInsets.only(top: 7.w), - child: _separator(), - ), - ], - ); - }, + ], + ); + }, + ), ), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 5.w), - child: Text( - 'summarySpeakerWillBeUpdatedAutomatically'.tr, // 对应中文:总结的发言者将自动更新 - style: TextStyle( - fontSize: 14.sp, - color: Colors.grey[600], + Padding( + padding: EdgeInsets.symmetric(vertical: 5.w), + child: Text( + 'summarySpeakerWillBeUpdatedAutomatically' + .tr, // 对应中文:总结的发言者将自动更新 + style: TextStyle( + fontSize: 14.sp, + color: Colors.grey[600], + ), ), ), - ), - Padding( - padding: EdgeInsets.only(bottom: 20.w), - child: Row( - children: [ - Expanded( - child: GestureDetector( - onTap: () => Get.back(), - child: Container( - height: 48.w, - alignment: Alignment.center, - decoration: BoxDecoration( - color: Colors.grey[300], - borderRadius: BorderRadius.circular(12.r), - ), - child: Text( - 'cancel'.tr, // 对应中文:取消 - style: TextStyle( - fontSize: 16.sp, - color: Colors.black, + Padding( + padding: EdgeInsets.only(bottom: 20.w), + child: Row( + children: [ + Expanded( + child: GestureDetector( + onTap: () => Get.back(), + child: Container( + height: 48.w, + alignment: Alignment.center, + decoration: BoxDecoration( + color: + isDarkMode ? Colors.grey[700] : Colors.grey[300], + borderRadius: BorderRadius.circular(12.r), + ), + child: Text( + 'cancel'.tr, // 对应中文:取消 + style: TextStyle( + fontSize: 16.sp, + color: isDarkMode ? Colors.white : Colors.black, + ), ), ), ), ), - ), - 10.horizontalSpace, - Expanded( - child: GestureDetector( - onTap: _save, - child: Container( - height: 48.w, - alignment: Alignment.center, - decoration: BoxDecoration( - color: Colors.black, - borderRadius: BorderRadius.circular(12.r), - ), - child: Text( - 'confirm'.tr, // 对应中文:确认 + 10.horizontalSpace, + Expanded( + child: GestureDetector( + onTap: _save, + child: Container( + height: 48.w, + alignment: Alignment.center, + decoration: BoxDecoration( + color: isDarkMode ? Colors.white : Colors.black, + borderRadius: BorderRadius.circular(12.r), + ), + child: Text( + 'confirm'.tr, // 对应中文:确认 - style: TextStyle( - fontSize: 16.sp, - color: Colors.white, + style: TextStyle( + fontSize: 16.sp, + color: isDarkMode ? Colors.black : Colors.white, + ), ), ), ), ), - ), - ], + ], + ), ), - ), ], ), ), @@ -498,6 +519,7 @@ class _SpeakerAllBottomSheetState extends State { Widget _separator() { return LayoutBuilder( builder: (BuildContext context, BoxConstraints constraints) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; final boxWidth = constraints.constrainWidth(); const dashWidth = 2.0; const dashHeight = 1.0; @@ -510,7 +532,8 @@ class _SpeakerAllBottomSheetState extends State { width: dashWidth, height: dashHeight, child: DecoratedBox( - decoration: BoxDecoration(color: Colors.grey[300]), + decoration: BoxDecoration( + color: isDarkMode ? Colors.grey[700] : Colors.grey[300]), ), ); }), diff --git a/lib/modules/meeting/views/bottomSheet/speaker_bottom_sheet.dart b/lib/modules/meeting/views/bottomSheet/speaker_bottom_sheet.dart index 2b53a2e6f..e9b794162 100644 --- a/lib/modules/meeting/views/bottomSheet/speaker_bottom_sheet.dart +++ b/lib/modules/meeting/views/bottomSheet/speaker_bottom_sheet.dart @@ -60,6 +60,7 @@ class _SpeakerBottomSheetState extends State { @override Widget build(BuildContext context) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; return SafeArea( top: false, child: Padding( @@ -67,169 +68,175 @@ class _SpeakerBottomSheetState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - Container( - padding: EdgeInsets.symmetric(vertical: 10.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - 'nameCurrentSpeaker'.tr, // 对应中文:命名当前发言者 - style: TextStyle( - fontSize: 16.sp, - color: Colors.black87, - fontWeight: FontWeight.bold, - ), - ), - GestureDetector( - onTap: () => Get.back(), - child: Container( - width: 26.w, - height: 26.w, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(26.r), - ), - child: Icon( - Icons.close, - size: 18.w, - color: Colors.grey[400], + Container( + padding: EdgeInsets.symmetric(vertical: 10.w), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'nameCurrentSpeaker'.tr, // 对应中文:命名当前发言者 + style: TextStyle( + fontSize: 16.sp, + color: isDarkMode ? Colors.white : Colors.black87, + fontWeight: FontWeight.bold, ), ), - ) - ], + GestureDetector( + onTap: () => Get.back(), + child: Container( + width: 26.w, + height: 26.w, + decoration: BoxDecoration( + color: isDarkMode ? Colors.grey[700] : Colors.white, + borderRadius: BorderRadius.circular(26.r), + ), + child: Icon( + Icons.close, + size: 18.w, + color: Colors.grey[400], + ), + ), + ) + ], + ), ), - ), - Divider( - height: 1, - color: Colors.grey[300], - ), - Container( - margin: EdgeInsets.symmetric(vertical: 15.w), - alignment: Alignment.center, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(12.r), + Divider( + height: 1, + color: isDarkMode ? Colors.grey[700] : Colors.grey[300], ), - child: TextField( - controller: _speakerController, - style: TextStyle( - fontSize: 16.sp, - color: Colors.black87, - letterSpacing: 0, - height: 1.4, + Container( + margin: EdgeInsets.symmetric(vertical: 15.w), + alignment: Alignment.center, + decoration: BoxDecoration( + color: isDarkMode ? const Color(0xFF2D2D2D) : Colors.white, + borderRadius: BorderRadius.circular(12.r), ), - decoration: InputDecoration( - hintText: widget.speakerName, - hintStyle: TextStyle( + child: TextField( + controller: _speakerController, + style: TextStyle( fontSize: 16.sp, - color: Colors.grey[400], + color: isDarkMode ? Colors.white : Colors.black87, letterSpacing: 0, height: 1.4, ), - isDense: true, - fillColor: Colors.transparent, - border: InputBorder.none, - contentPadding: EdgeInsets.symmetric( - horizontal: 10.w, - vertical: 12.w, + decoration: InputDecoration( + hintText: widget.speakerName, + hintStyle: TextStyle( + fontSize: 16.sp, + color: Colors.grey[400], + letterSpacing: 0, + height: 1.4, + ), + isDense: true, + fillColor: Colors.transparent, + border: InputBorder.none, + contentPadding: EdgeInsets.symmetric( + horizontal: 10.w, + vertical: 12.w, + ), ), ), ), - ), - Container( - constraints: BoxConstraints( - maxHeight: - 1.sh - 390.w - MediaQuery.of(context).viewInsets.bottom, - ), - child: ListView.builder( - itemCount: _speakerList.length, - shrinkWrap: true, - itemBuilder: (BuildContext context, int index) { - return Container( - padding: EdgeInsets.only(left: 10.w), - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - width: 1, - color: Colors.grey[300]!, + Container( + constraints: BoxConstraints( + maxHeight: + 1.sh - 390.w - MediaQuery.of(context).viewInsets.bottom, + ), + child: ListView.builder( + itemCount: _speakerList.length, + shrinkWrap: true, + itemBuilder: (BuildContext context, int index) { + return Container( + padding: EdgeInsets.only(left: 10.w), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + width: 1, + color: isDarkMode + ? Colors.grey[700]! + : Colors.grey[300]!, + ), ), ), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (index == 0) - Text( - 'recentlyUsedNames'.tr, // 对应中文:最近使用过的名称 - style: TextStyle( - fontSize: 12.sp, - color: Colors.grey[600]!, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (index == 0) + Text( + 'recentlyUsedNames'.tr, // 对应中文:最近使用过的名称 + style: TextStyle( + fontSize: 12.sp, + color: Colors.grey[600]!, + ), ), - ), - GestureDetector( - onTap: () { - _speakerController.text = _speakerList[index]; - }, - behavior: HitTestBehavior.translucent, - child: SizedBox( - height: 42.w, - child: Align( - alignment: Alignment.centerLeft, - child: Text( - _speakerList[index], - style: TextStyle( - fontSize: 14.sp, - color: Colors.black87, + GestureDetector( + onTap: () { + _speakerController.text = _speakerList[index]; + }, + behavior: HitTestBehavior.translucent, + child: SizedBox( + height: 42.w, + child: Align( + alignment: Alignment.centerLeft, + child: Text( + _speakerList[index], + style: TextStyle( + fontSize: 14.sp, + color: isDarkMode + ? Colors.white + : Colors.black87, + ), ), ), ), ), - ), - ], - ), - ); - }, + ], + ), + ); + }, + ), ), - ), - _row( - 'applyToCurrentParagraph'.tr, // 对应中文:应用到当前段落 - _type == 0, onTap: () { - setState(() { - _type = 0; - }); - }), - _row( - 'applyToAllParagraphs'.tr, // 对应中文:应用到这个发言者的所有段落 - _type == 1, - description: - 'summaryWillBeUpdatedAutomatically'.tr, // 对应中文:总结将根据模版自动更新 - onTap: () { + _row( + 'applyToCurrentParagraph'.tr, // 对应中文:应用到当前段落 + _type == 0, + isDarkMode: isDarkMode, onTap: () { setState(() { - _type = 1; + _type = 0; }); - }, - ), - Padding( - padding: EdgeInsets.only(top: 10.w, bottom: 20.w), - child: GestureDetector( - onTap: _save, - child: Container( - height: 48.w, - alignment: Alignment.center, - decoration: BoxDecoration( - color: Colors.black, - borderRadius: BorderRadius.circular(12.r), - ), - child: Text( - 'save'.tr, // 对应中文:保存 - style: TextStyle( - fontSize: 16.sp, - color: Colors.white, + }), + _row( + 'applyToAllParagraphs'.tr, // 对应中文:应用到这个发言者的所有段落 + _type == 1, + isDarkMode: isDarkMode, + description: + 'summaryWillBeUpdatedAutomatically'.tr, // 对应中文:总结将根据模版自动更新 + onTap: () { + setState(() { + _type = 1; + }); + }, + ), + Padding( + padding: EdgeInsets.only(top: 10.w, bottom: 20.w), + child: GestureDetector( + onTap: _save, + child: Container( + height: 48.w, + alignment: Alignment.center, + decoration: BoxDecoration( + color: isDarkMode ? Colors.white : Colors.black, + borderRadius: BorderRadius.circular(12.r), + ), + child: Text( + 'save'.tr, // 对应中文:保存 + style: TextStyle( + fontSize: 16.sp, + color: isDarkMode ? Colors.black : Colors.white, + ), ), ), ), ), - ), ], ), ), @@ -237,14 +244,14 @@ class _SpeakerBottomSheetState extends State { } Widget _row(String name, bool isActive, - {String? description, Function()? onTap}) { + {String? description, Function()? onTap, bool isDarkMode = false}) { return GestureDetector( onTap: onTap, child: Padding( padding: EdgeInsets.symmetric(vertical: 10.w), child: Row( children: [ - isActive ? _round() : _circle(), + isActive ? _round(isDarkMode) : _circle(isDarkMode), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -253,7 +260,7 @@ class _SpeakerBottomSheetState extends State { name, style: TextStyle( fontSize: 14.sp, - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, ), ), if (description != null) @@ -273,7 +280,7 @@ class _SpeakerBottomSheetState extends State { ); } - Widget _circle() { + Widget _circle(bool isDarkMode) { return Container( width: 18.w, height: 18.w, @@ -282,13 +289,13 @@ class _SpeakerBottomSheetState extends State { borderRadius: BorderRadius.circular(18.r), border: Border.all( width: 1.5, - color: Colors.grey[300]!, + color: isDarkMode ? Colors.grey[600]! : Colors.grey[300]!, ), ), ); } - Widget _round() { + Widget _round(bool isDarkMode) { return Container( width: 18.w, height: 18.w, @@ -298,12 +305,12 @@ class _SpeakerBottomSheetState extends State { borderRadius: BorderRadius.circular(18.r), border: Border.all( width: 1.5, - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, ), ), child: Container( decoration: BoxDecoration( - color: Colors.black87, + color: isDarkMode ? Colors.white : Colors.black87, borderRadius: BorderRadius.circular(18.r), ), ), diff --git a/lib/modules/meeting/views/meeting_details_view.dart b/lib/modules/meeting/views/meeting_details_view.dart index b23035a2d..ea87ad120 100644 --- a/lib/modules/meeting/views/meeting_details_view.dart +++ b/lib/modules/meeting/views/meeting_details_view.dart @@ -80,7 +80,9 @@ class MeetingDetailsView extends GetView { padding: EdgeInsets.symmetric(horizontal: 2.w, vertical: 3.w), clipBehavior: Clip.hardEdge, decoration: BoxDecoration( - color: Colors.grey[200], + color: isDarkMode + ? Colors.grey[850] ?? const Color(0xFF1F1F1F) + : Colors.grey[200], borderRadius: BorderRadius.circular(30.r), ), child: Row( @@ -139,7 +141,9 @@ class MeetingDetailsView extends GetView { ), Icon( Icons.download_for_offline, - color: Colors.black, + color: isDarkMode + ? Colors.white + : Colors.black, size: 30.w, ), ], @@ -149,7 +153,7 @@ class MeetingDetailsView extends GetView { controller.isPlay.value ? Icons.pause_circle : Icons.play_circle, - color: Colors.black, + color: isDarkMode ? Colors.white : Colors.black, size: 30.w, ), ), @@ -323,14 +327,14 @@ class MeetingDetailsView extends GetView { child: Obx( () => Row( children: [ - _iconItem( - Icons.summarize, 'overview'.tr, 0), // 对应中文:概览 - _iconItem(Icons.message, 'transcription'.tr, - 1), // 对应中文:转写 - _iconItem( - Icons.article, 'summary'.tr, 2), // 对应中文:总结 - _iconItem( - Icons.lan, 'mindMap'.tr, 3), // 对应中文:思维导图 + _iconItem(Icons.summarize, 'overview'.tr, 0, + isDarkMode), // 对应中文:概览 + _iconItem(Icons.message, 'transcription'.tr, 1, + isDarkMode), // 对应中文:转写 + _iconItem(Icons.article, 'summary'.tr, 2, + isDarkMode), // 对应中文:总结 + _iconItem(Icons.lan, 'mindMap'.tr, 3, + isDarkMode), // 对应中文:思维导图 ], ), ), @@ -524,7 +528,7 @@ class MeetingDetailsView extends GetView { }, child: Icon( Icons.replay_10, - color: Colors.black, + color: isDarkMode ? Colors.white : Colors.black, size: 30.w, ), ), @@ -586,7 +590,9 @@ class MeetingDetailsView extends GetView { ), Icon( Icons.download_for_offline, - color: Colors.black, + color: isDarkMode + ? Colors.white + : Colors.black, size: 48.w, ), ], @@ -596,7 +602,9 @@ class MeetingDetailsView extends GetView { controller.isPlay.value ? Icons.pause_circle : Icons.play_circle, - color: Colors.black, + color: isDarkMode + ? Colors.white + : Colors.black, size: 48.w, ), ), @@ -609,7 +617,7 @@ class MeetingDetailsView extends GetView { }, child: Icon( Icons.forward_10, - color: Colors.black, + color: isDarkMode ? Colors.white : Colors.black, size: 30.w, ), ), @@ -626,7 +634,7 @@ class MeetingDetailsView extends GetView { ); } - Widget _iconItem(IconData icon, String title, int index) { + Widget _iconItem(IconData icon, String title, int index, bool isDarkMode) { bool isActive = controller.currentIndex.value == index; return Expanded( @@ -641,7 +649,9 @@ class MeetingDetailsView extends GetView { padding: EdgeInsets.symmetric(horizontal: 18.w), margin: EdgeInsets.symmetric(horizontal: 4.w), decoration: BoxDecoration( - color: isActive ? Colors.black : Colors.grey[200], + color: isActive + ? (isDarkMode ? Colors.white : Colors.black) + : (isDarkMode ? const Color(0xFF2D2D2D) : Colors.grey[200]), borderRadius: BorderRadius.circular(12.w), ), child: Row( @@ -649,7 +659,9 @@ class MeetingDetailsView extends GetView { children: [ Icon( icon, - color: isActive ? Colors.white : Colors.grey[600], + color: isActive + ? (isDarkMode ? Colors.black : Colors.white) + : (isDarkMode ? Colors.grey[400] : Colors.grey[600]), size: 20.sp, ), if (isActive) @@ -658,7 +670,7 @@ class MeetingDetailsView extends GetView { child: Text( title, style: TextStyle( - color: Colors.white, + color: isDarkMode ? Colors.black : Colors.white, fontSize: 16.sp, ), ), diff --git a/lib/modules/meeting/views/tabs/overview_tab.dart b/lib/modules/meeting/views/tabs/overview_tab.dart index 858a83b82..335237619 100644 --- a/lib/modules/meeting/views/tabs/overview_tab.dart +++ b/lib/modules/meeting/views/tabs/overview_tab.dart @@ -211,35 +211,40 @@ class _OverviewTabState extends State { } Widget _button(IconData icon, String title, Function() onTap) { - return GestureDetector( - onTap: onTap, - child: Container( - height: 42.w, - padding: EdgeInsets.symmetric(horizontal: 15.w), - margin: EdgeInsets.symmetric(horizontal: 4.w), - decoration: BoxDecoration( - color: Colors.black, - borderRadius: BorderRadius.circular(42.w), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - icon, - color: Colors.white, - size: 20.sp, + return Builder( + builder: (context) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; + return GestureDetector( + onTap: onTap, + child: Container( + height: 42.w, + padding: EdgeInsets.symmetric(horizontal: 15.w), + margin: EdgeInsets.symmetric(horizontal: 4.w), + decoration: BoxDecoration( + color: isDarkMode ? Colors.white : Colors.black, + borderRadius: BorderRadius.circular(42.w), ), - 5.horizontalSpace, - Text( - title, - style: TextStyle( - color: Colors.white, - fontSize: 14.sp, - ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + icon, + color: isDarkMode ? Colors.black : Colors.white, + size: 20.sp, + ), + 5.horizontalSpace, + Text( + title, + style: TextStyle( + color: isDarkMode ? Colors.black : Colors.white, + fontSize: 14.sp, + ), + ), + ], ), - ], - ), - ), + ), + ); + }, ); } diff --git a/lib/modules/meeting/views/tabs/speech_tab.dart b/lib/modules/meeting/views/tabs/speech_tab.dart index 62d867c1c..f4aa32961 100644 --- a/lib/modules/meeting/views/tabs/speech_tab.dart +++ b/lib/modules/meeting/views/tabs/speech_tab.dart @@ -344,9 +344,8 @@ class SpeechTab extends GetView { Get.bottomSheet( const GenerateBottomSheet(), isScrollControlled: true, - backgroundColor: isDarkMode - ? Colors.grey[800] - : Colors.grey[100], + backgroundColor: + isDarkMode ? Colors.grey[800] : Colors.grey[100], shape: RoundedRectangleBorder( borderRadius: BorderRadius.vertical( top: Radius.circular(12.r), @@ -366,9 +365,8 @@ class SpeechTab extends GetView { Get.bottomSheet( const GenerateBottomSheet(), isScrollControlled: true, - backgroundColor: isDarkMode - ? Colors.grey[800] - : Colors.grey[100], + backgroundColor: + isDarkMode ? Colors.grey[800] : Colors.grey[100], shape: RoundedRectangleBorder( borderRadius: BorderRadius.vertical( top: Radius.circular(12.r), @@ -387,35 +385,40 @@ class SpeechTab extends GetView { } Widget _button(IconData icon, String title, Function() onTap) { - return GestureDetector( - onTap: onTap, - child: Container( - height: 42.w, - padding: EdgeInsets.symmetric(horizontal: 15.w), - margin: EdgeInsets.symmetric(horizontal: 4.w), - decoration: BoxDecoration( - color: Colors.black, - borderRadius: BorderRadius.circular(42.w), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - icon, - color: Colors.white, - size: 20.sp, + return Builder( + builder: (context) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; + return GestureDetector( + onTap: onTap, + child: Container( + height: 42.w, + padding: EdgeInsets.symmetric(horizontal: 15.w), + margin: EdgeInsets.symmetric(horizontal: 4.w), + decoration: BoxDecoration( + color: isDarkMode ? Colors.white : Colors.black, + borderRadius: BorderRadius.circular(42.w), ), - 5.horizontalSpace, - Text( - title, - style: TextStyle( - color: Colors.white, - fontSize: 14.sp, - ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + icon, + color: isDarkMode ? Colors.black : Colors.white, + size: 20.sp, + ), + 5.horizontalSpace, + Text( + title, + style: TextStyle( + color: isDarkMode ? Colors.black : Colors.white, + fontSize: 14.sp, + ), + ), + ], ), - ], - ), - ), + ), + ); + }, ); } } diff --git a/lib/modules/meeting/views/tabs/summary_tab.dart b/lib/modules/meeting/views/tabs/summary_tab.dart index 860edc5c7..b07183a27 100644 --- a/lib/modules/meeting/views/tabs/summary_tab.dart +++ b/lib/modules/meeting/views/tabs/summary_tab.dart @@ -499,35 +499,40 @@ class _SummaryTabState extends State { } Widget _button(IconData icon, String title, Function() onTap) { - return GestureDetector( - onTap: onTap, - child: Container( - height: 42.w, - padding: EdgeInsets.symmetric(horizontal: 15.w), - margin: EdgeInsets.symmetric(horizontal: 4.w), - decoration: BoxDecoration( - color: Colors.black, - borderRadius: BorderRadius.circular(42.w), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - icon, - color: Colors.white, - size: 20.sp, + return Builder( + builder: (context) { + final isDarkMode = Theme.of(context).brightness == Brightness.dark; + return GestureDetector( + onTap: onTap, + child: Container( + height: 42.w, + padding: EdgeInsets.symmetric(horizontal: 15.w), + margin: EdgeInsets.symmetric(horizontal: 4.w), + decoration: BoxDecoration( + color: isDarkMode ? Colors.white : Colors.black, + borderRadius: BorderRadius.circular(42.w), ), - 5.horizontalSpace, - Text( - title, - style: TextStyle( - color: Colors.white, - fontSize: 14.sp, - ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + icon, + color: isDarkMode ? Colors.black : Colors.white, + size: 20.sp, + ), + 5.horizontalSpace, + Text( + title, + style: TextStyle( + color: isDarkMode ? Colors.black : Colors.white, + fontSize: 14.sp, + ), + ), + ], ), - ], - ), - ), + ), + ); + }, ); }