Browse Source

style(meeting): 统一暗黑模式适配及界面颜色优化

- 优化 MeetingUIUtils 组件中暗黑模式下背景色和卡片阴影颜色
- 在多处底部弹窗组件中添加暗黑模式判断,统一调整文字、背景、边框等颜色
- AI底部弹窗添加输入框内容监听,控制发送按钮颜色与可点击状态
- 编辑会议标题弹窗按钮色彩及边框根据暗黑模式进行切换
- 筛选抽屉组件使用 MeetingUIUtils 统一文本和背景颜色
- 生成会议弹窗内部多处颜色适配暗黑模式,按钮和选项视觉统一
- 成员底部弹窗界面调整为响应暗黑模式,文字和控件颜色分别适配
- 更多底部弹窗菜单项颜色随暗黑模式切换,禁用状态透明度保持一致
- 录音语言底部弹窗整体颜色调整,列表条目边界颜色支持暗黑模式
- 优化各类控件在暗黑/亮色模式下的切换逻辑,改善用户视觉体验
newdev_shunjiawei
lxm 7 months ago
parent
commit
acd421121c
  1. 24
      lib/modules/meeting/utils/meeting_ui_utils.dart
  2. 63
      lib/modules/meeting/views/bottomSheet/ai_bottom_sheet.dart
  3. 206
      lib/modules/meeting/views/bottomSheet/edit_title_bottom_sheet.dart
  4. 51
      lib/modules/meeting/views/bottomSheet/filtrate_drawer.dart
  5. 52
      lib/modules/meeting/views/bottomSheet/generate_bottom_sheet.dart
  6. 194
      lib/modules/meeting/views/bottomSheet/member_bottom_sheet.dart
  7. 69
      lib/modules/meeting/views/bottomSheet/more_bottom_sheet.dart
  8. 109
      lib/modules/meeting/views/bottomSheet/record_language_bottom_sheet.dart
  9. 234
      lib/modules/meeting/views/bottomSheet/second_level_bottom_sheet.dart
  10. 25
      lib/modules/meeting/views/bottomSheet/share_bottom_sheet.dart
  11. 697
      lib/modules/meeting/views/bottomSheet/speaker_all_bottom_sheet.dart
  12. 297
      lib/modules/meeting/views/bottomSheet/speaker_bottom_sheet.dart
  13. 50
      lib/modules/meeting/views/meeting_details_view.dart
  14. 59
      lib/modules/meeting/views/tabs/overview_tab.dart
  15. 69
      lib/modules/meeting/views/tabs/speech_tab.dart
  16. 59
      lib/modules/meeting/views/tabs/summary_tab.dart

24
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<BoxShadow> 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);
}
}
}

63
lib/modules/meeting/views/bottomSheet/ai_bottom_sheet.dart

@ -39,11 +39,26 @@ class _AIBottomSheetState extends State<AIBottomSheet> {
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<AIBottomSheet> {
@override
void dispose() {
_textController.removeListener(_onTextChanged);
_textController.dispose();
_scrollController.dispose();
_aiResponseSubscription?.cancel();
@ -74,6 +90,7 @@ class _AIBottomSheetState extends State<AIBottomSheet> {
@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<AIBottomSheet> {
'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<AIBottomSheet> {
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<AIBottomSheet> {
}
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<AIBottomSheet> {
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<AIBottomSheet> {
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<AIBottomSheet> {
}
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<AIBottomSheet> {
style: TextStyle(
fontSize: 18.sp,
fontWeight: FontWeight.bold,
color: isDarkMode ? Colors.white : Colors.black87,
),
),
Padding(
@ -266,15 +292,18 @@ class _AIBottomSheetState extends State<AIBottomSheet> {
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<AIBottomSheet> {
}
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<AIBottomSheet> {
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<AIBottomSheet> {
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<AIBottomSheet> {
),
isDense: true,
fillColor: Colors.transparent,
focusedBorder: InputBorder.none,
border: InputBorder.none,
),
onSubmitted: _sendMessage,
@ -330,13 +361,17 @@ class _AIBottomSheetState extends State<AIBottomSheet> {
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(

206
lib/modules/meeting/views/bottomSheet/edit_title_bottom_sheet.dart

@ -11,6 +11,7 @@ class EditTitleBottomSheet extends GetView<MeetingHomeController> {
@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<MeetingHomeController> {
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,
),
),
),
),
),
),
],
],
),
),
),
],
),
),

51
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<FiltrateDrawer> {
@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<FiltrateDrawer> {
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<FiltrateDrawer> {
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<FiltrateDrawer> {
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<FiltrateDrawer> {
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<FiltrateDrawer> {
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<FiltrateDrawer> {
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<FiltrateDrawer> {
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<FiltrateDrawer> {
Text(
'creationTime'.tr, // 对应中文:创建时间
style: TextStyle(
color: Colors.black87,
color: MeetingUIUtils.getTextColor(isDarkMode),
fontSize: 14.sp,
),
),
@ -207,7 +204,7 @@ class _FiltrateDrawerState extends State<FiltrateDrawer> {
_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,
),
],

52
lib/modules/meeting/views/bottomSheet/generate_bottom_sheet.dart

@ -88,6 +88,7 @@ class _GenerateBottomSheetState extends State<GenerateBottomSheet> {
@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<GenerateBottomSheet> {
_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<GenerateBottomSheet> {
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<GenerateBottomSheet> {
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<GenerateBottomSheet> {
'selectSummaryTemplate'.tr, // 对应中文:选择总结模版
style: TextStyle(
fontSize: 14.sp,
color: Colors.black87,
color: isDarkMode ? Colors.white : Colors.black87,
),
),
),
@ -258,13 +259,14 @@ class _GenerateBottomSheetState extends State<GenerateBottomSheet> {
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<GenerateBottomSheet> {
_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<GenerateBottomSheet> {
'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<GenerateBottomSheet> {
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<GenerateBottomSheet> {
}
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<GenerateBottomSheet> {
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<GenerateBottomSheet> {
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<GenerateBottomSheet> {
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<GenerateBottomSheet> {
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<GenerateBottomSheet> {
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<GenerateBottomSheet> {
String? value,
Widget? widget,
bool isBorder = true,
bool isDarkMode = false,
Function()? onTap,
}) {
return GestureDetector(
@ -540,7 +554,7 @@ class _GenerateBottomSheetState extends State<GenerateBottomSheet> {
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<GenerateBottomSheet> {
title,
style: TextStyle(
fontSize: 14.sp,
color: Colors.black87,
color: isDarkMode ? Colors.white : Colors.black87,
),
),
),
@ -566,9 +580,9 @@ class _GenerateBottomSheetState extends State<GenerateBottomSheet> {
color: Colors.grey,
),
),
const Icon(
Icon(
Icons.keyboard_arrow_right,
color: Colors.grey,
color: isDarkMode ? Colors.grey[500] : Colors.grey,
)
],
),

194
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,
),

69
lib/modules/meeting/views/bottomSheet/more_bottom_sheet.dart

@ -19,6 +19,7 @@ class _MoreBottomSheetState extends State<MoreBottomSheet> {
@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<MoreBottomSheet> {
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<MoreBottomSheet> {
IconData icon,
String title, {
VoidCallback? onTap,
bool isDarkMode = false,
}) {
return InkWell(
onTap: onTap,
@ -71,7 +76,9 @@ class _MoreBottomSheetState extends State<MoreBottomSheet> {
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<MoreBottomSheet> {
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<MoreBottomSheet> {
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),
),
),
),

109
lib/modules/meeting/views/bottomSheet/record_language_bottom_sheet.dart

@ -29,6 +29,7 @@ class _RecordLanguageBottomSheetState extends State<RecordLanguageBottomSheet> {
@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<RecordLanguageBottomSheet> {
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<RecordLanguageBottomSheet> {
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<RecordLanguageBottomSheet> {
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,
),
],
),

234
lib/modules/meeting/views/bottomSheet/second_level_bottom_sheet.dart

@ -21,6 +21,7 @@ class _SecondLevelBottomSheetState extends State<SecondLevelBottomSheet> {
@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<SecondLevelBottomSheet> {
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,
),
),
),
),
),
),
],
),
),

25
lib/modules/meeting/views/bottomSheet/share_bottom_sheet.dart

@ -30,6 +30,7 @@ class _ShareBottomSheetState extends State<ShareBottomSheet> {
@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<ShareBottomSheet> {
_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<ShareBottomSheet> {
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<ShareBottomSheet> {
],
),
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<ShareBottomSheet> {
}
Widget _box(List<Widget> 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<ShareBottomSheet> {
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<ShareBottomSheet> {
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<ShareBottomSheet> {
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),
),
),
),

697
lib/modules/meeting/views/bottomSheet/speaker_all_bottom_sheet.dart

@ -89,6 +89,7 @@ class _SpeakerAllBottomSheetState extends State<SpeakerAllBottomSheet> {
@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<SpeakerAllBottomSheet> {
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<SpeakerAllBottomSheet> {
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<SpeakerAllBottomSheet> {
width: dashWidth,
height: dashHeight,
child: DecoratedBox(
decoration: BoxDecoration(color: Colors.grey[300]),
decoration: BoxDecoration(
color: isDarkMode ? Colors.grey[700] : Colors.grey[300]),
),
);
}),

297
lib/modules/meeting/views/bottomSheet/speaker_bottom_sheet.dart

@ -60,6 +60,7 @@ class _SpeakerBottomSheetState extends State<SpeakerBottomSheet> {
@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<SpeakerBottomSheet> {
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<SpeakerBottomSheet> {
}
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<SpeakerBottomSheet> {
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<SpeakerBottomSheet> {
);
}
Widget _circle() {
Widget _circle(bool isDarkMode) {
return Container(
width: 18.w,
height: 18.w,
@ -282,13 +289,13 @@ class _SpeakerBottomSheetState extends State<SpeakerBottomSheet> {
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<SpeakerBottomSheet> {
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),
),
),

50
lib/modules/meeting/views/meeting_details_view.dart

@ -80,7 +80,9 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> {
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<MeetingDetailsController> {
),
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<MeetingDetailsController> {
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<MeetingDetailsController> {
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<MeetingDetailsController> {
},
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<MeetingDetailsController> {
),
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<MeetingDetailsController> {
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<MeetingDetailsController> {
},
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<MeetingDetailsController> {
);
}
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<MeetingDetailsController> {
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<MeetingDetailsController> {
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<MeetingDetailsController> {
child: Text(
title,
style: TextStyle(
color: Colors.white,
color: isDarkMode ? Colors.black : Colors.white,
fontSize: 16.sp,
),
),

59
lib/modules/meeting/views/tabs/overview_tab.dart

@ -211,35 +211,40 @@ class _OverviewTabState extends State<OverviewTab> {
}
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,
),
),
],
),
],
),
),
),
);
},
);
}

69
lib/modules/meeting/views/tabs/speech_tab.dart

@ -344,9 +344,8 @@ class SpeechTab extends GetView<MeetingDetailsController> {
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<MeetingDetailsController> {
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<MeetingDetailsController> {
}
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,
),
),
],
),
],
),
),
),
);
},
);
}
}

59
lib/modules/meeting/views/tabs/summary_tab.dart

@ -499,35 +499,40 @@ class _SummaryTabState extends State<SummaryTab> {
}
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,
),
),
],
),
],
),
),
),
);
},
);
}

Loading…
Cancel
Save