Browse Source

优化会议助手

newdev_shunjiawei
tanlongsheng 1 year ago
parent
commit
2ec711fb25
  1. 5
      lib/modules/meeting/controllers/meeting_controller.dart
  2. 6
      lib/modules/meeting/views/bottomSheet/ai_bottom_sheet.dart
  3. 142
      lib/modules/meeting/views/bottomSheet/edit_title_bottom_sheet.dart
  4. 74
      lib/modules/meeting/views/bottomSheet/filtrate_drawer.dart
  5. 6
      lib/modules/meeting/views/bottomSheet/generate_bottom_sheet.dart
  6. 149
      lib/modules/meeting/views/bottomSheet/import_audio_bottom_sheet.dart
  7. 4
      lib/modules/meeting/views/bottomSheet/more_bottom_sheet.dart
  8. 0
      lib/modules/meeting/views/bottomSheet/record_language_bottom_sheet.dart
  9. 6
      lib/modules/meeting/views/bottomSheet/share_bottom_sheet.dart
  10. 6
      lib/modules/meeting/views/bottomSheet/speaker_all_bottom_sheet.dart
  11. 6
      lib/modules/meeting/views/bottomSheet/speaker_bottom_sheet.dart
  12. 12
      lib/modules/meeting/views/meeting_details_view.dart
  13. 1064
      lib/modules/meeting/views/meeting_view.dart
  14. 2
      lib/modules/meeting/views/tabs/mind_map_tab.dart
  15. 6
      lib/modules/meeting/views/tabs/overview_tab.dart
  16. 10
      lib/modules/meeting/views/tabs/speech_tab.dart
  17. 10
      lib/modules/meeting/views/tabs/summary_tab.dart

5
lib/modules/meeting/controllers/meeting_controller.dart

@ -367,8 +367,9 @@ class MeetingController extends GetxController {
}
// 修改标题
void editMeetingTitle(int id, String title) async {
if (title.isNotEmpty) {
void editMeetingTitle(int id) async {
if (titleController.text.isNotEmpty) {
String title = titleController.text + titleCSuffix;
SqfliteApi.editMeetingTitle(id, {'title': title});
int index = dataList.indexWhere((item) => item['id'] == id);
if (index != -1) {

6
lib/modules/meeting/views/ai_bottom_sheet.dart → lib/modules/meeting/views/bottomSheet/ai_bottom_sheet.dart

@ -5,9 +5,9 @@ import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../data/services/db/sqflite_api.dart';
import '../../../data/services/deapsound_ai_service.dart';
import '../controllers/meeting_details_controller.dart';
import '../../../../data/services/db/sqflite_api.dart';
import '../../../../data/services/deapsound_ai_service.dart';
import '../../controllers/meeting_details_controller.dart';
class AIBottomSheet extends StatefulWidget {
const AIBottomSheet({super.key});

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

@ -0,0 +1,142 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../controllers/meeting_controller.dart';
class EditTitleBottomSheet extends GetView<MeetingController> {
final int id;
const EditTitleBottomSheet(this.id, {super.key});
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
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],
),
),
)
],
),
),
Divider(
height: 1,
color: Colors.grey[300],
),
Container(
height: 48.w,
margin: EdgeInsets.symmetric(vertical: 20.w),
alignment: Alignment.center,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.w),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 10,
offset: const Offset(0, 2),
),
],
),
child: TextField(
controller: controller.titleController,
style: TextStyle(
color: Colors.black87,
fontSize: 16.sp,
),
decoration: InputDecoration(
hintText: 'maxCharacters'.tr,
hintStyle: TextStyle(
color: Colors.black54,
fontSize: 16.sp,
),
fillColor: Colors.transparent,
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(horizontal: 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,
),
),
),
),
),
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,
),
),
),
),
),
],
),
),
],
),
);
}
}

74
lib/modules/meeting/views/bottomSheet/filtrate_drawer.dart

@ -0,0 +1,74 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class FiltrateDrawer extends StatelessWidget {
const FiltrateDrawer({super.key});
@override
Widget build(BuildContext context) {
return SafeArea(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.all(20.w),
child: TextField(
decoration: InputDecoration(
hintText: '在所有文件中搜索',
prefixIcon: Icon(Icons.search),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12.w),
borderSide: BorderSide.none,
),
filled: true,
fillColor: Colors.grey[100],
contentPadding: EdgeInsets.zero,
),
),
),
ListTile(
leading: Icon(Icons.folder, color: Colors.red),
title:
Text('全部文件(4)', style: TextStyle(fontWeight: FontWeight.bold)),
onTap: () {},
),
ListTile(
leading: Icon(Icons.category, color: Colors.blue),
title: Text('未分类(4)'),
onTap: () {},
),
ListTile(
leading: Icon(Icons.delete, color: Colors.teal),
title: Text('回收站'),
onTap: () {},
),
Divider(),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 8.w),
child: Text('文件夹', style: TextStyle(color: Colors.grey)),
),
...['NOTE', 'CALL', 'NotePin', 'Import', 'Desktop']
.map((name) => ListTile(
title: Text(name),
onTap: () {},
)),
Divider(),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 8.w),
child: Text('排序方式', style: TextStyle(color: Colors.grey)),
),
ListTile(
title: Text('创建时间'),
trailing: Icon(Icons.arrow_upward),
onTap: () {},
),
ListTile(
title: Text('修改时间'),
trailing: Icon(Icons.arrow_upward),
onTap: () {},
),
],
),
);
}
}

6
lib/modules/meeting/views/generate_bottom_sheet.dart → lib/modules/meeting/views/bottomSheet/generate_bottom_sheet.dart

@ -1,12 +1,12 @@
import '../../../data/services/db/sqflite_api.dart';
import '../../../../data/services/db/sqflite_api.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import '../controllers/meeting_details_controller.dart';
import '../../controllers/meeting_details_controller.dart';
import 'record_language_bottom_sheet.dart';
import 'template_view.dart';
import '../template_view.dart';
class GenerateBottomSheet extends StatefulWidget {
final bool isSummarizeAgain;

149
lib/modules/meeting/views/bottomSheet/import_audio_bottom_sheet.dart

@ -0,0 +1,149 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../../routes/app_routes.dart';
import '../../controllers/meeting_controller.dart';
class ImportAudioBottomSheet extends GetView<MeetingController> {
const ImportAudioBottomSheet({super.key});
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
padding: EdgeInsets.symmetric(vertical: 10.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'添加音频',
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],
),
),
)
],
),
),
Divider(
height: 1,
color: Colors.grey[300],
),
SizedBox(height: 16.w),
_importAudioItem(Icons.mic, '现场录音', onTap: () async {
Get.back();
await Get.toNamed(Routes.meetingRecord, arguments: {
'audioTypes': 0,
});
controller.addMeetingAudio();
}),
_importAudioItem(
Icons.videocam,
'音、视频录音',
onTap: controller.bleManager.isConnected
? () async {
Get.back();
await Get.toNamed(Routes.meetingRecord, arguments: {
'audioTypes': 1,
});
controller.addMeetingAudio();
}
: null,
),
_importAudioItem(
Icons.phone,
'通话录音',
onTap: controller.bleManager.isConnected
? () async {
Get.back();
await Get.toNamed(Routes.meetingRecord, arguments: {
'audioTypes': 2,
});
controller.addMeetingAudio();
}
: null,
),
_importAudioItem(Icons.library_music, '导入本地音频', onTap: () {
Get.back();
controller.addAudio();
}),
Padding(
padding: EdgeInsets.symmetric(vertical: 16.w),
child: Text(
'支持导入单文件时长不超过5小时的音频',
style: TextStyle(
fontSize: 14.sp,
color: Colors.grey[600],
),
),
),
SizedBox(height: 4.w),
],
),
);
}
Widget _importAudioItem(
IconData icon,
String title, {
VoidCallback? onTap,
}) {
return GestureDetector(
onTap: onTap,
child: Container(
height: 48.w,
padding: EdgeInsets.symmetric(horizontal: 12.w),
margin: EdgeInsets.symmetric(vertical: 4.w),
decoration: BoxDecoration(
color: Colors.grey[50]!.withOpacity(onTap != null ? 1 : 0.5),
borderRadius: BorderRadius.circular(12.w),
),
child: Row(
children: [
Opacity(
opacity: onTap != null ? 1.0 : 0.5,
child: Icon(icon, size: 20.w),
),
10.horizontalSpace,
Expanded(
child: Text(
title,
style: TextStyle(
fontSize: 14.sp,
color: Colors.black87.withOpacity(onTap != null ? 1 : 0.5),
),
),
),
Icon(
Icons.arrow_forward_ios,
size: 16.w,
color: Colors.grey.withOpacity(onTap != null ? 1 : 0.5),
),
],
),
),
);
}
}

4
lib/modules/meeting/views/more_bottom_sheet.dart → lib/modules/meeting/views/bottomSheet/more_bottom_sheet.dart

@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../controllers/meeting_controller.dart';
import '../controllers/meeting_details_controller.dart';
import '../../controllers/meeting_controller.dart';
import '../../controllers/meeting_details_controller.dart';
import 'generate_bottom_sheet.dart';
class MoreBottomSheet extends StatefulWidget {

0
lib/modules/meeting/views/record_language_bottom_sheet.dart → lib/modules/meeting/views/bottomSheet/record_language_bottom_sheet.dart

6
lib/modules/meeting/views/share_bottom_sheet.dart → lib/modules/meeting/views/bottomSheet/share_bottom_sheet.dart

@ -11,9 +11,9 @@ import 'package:path_provider/path_provider.dart';
import 'package:share_plus/share_plus.dart';
import 'package:webview_flutter/webview_flutter.dart';
import '../../../core/utils/synchrodata.dart';
import '../controllers/meeting_details_controller.dart';
import '../controllers/mind_map_controller.dart';
import '../../../../core/utils/synchrodata.dart';
import '../../controllers/meeting_details_controller.dart';
import '../../controllers/mind_map_controller.dart';
class ShareBottomSheet extends StatefulWidget {
const ShareBottomSheet({super.key});

6
lib/modules/meeting/views/speaker_all_bottom_sheet.dart → lib/modules/meeting/views/bottomSheet/speaker_all_bottom_sheet.dart

@ -8,9 +8,9 @@ import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import 'package:lottie/lottie.dart';
import '../../../core/utils/synchrodata.dart';
import '../../../data/services/db/sqflite_api.dart';
import '../controllers/meeting_details_controller.dart';
import '../../../../core/utils/synchrodata.dart';
import '../../../../data/services/db/sqflite_api.dart';
import '../../controllers/meeting_details_controller.dart';
class SpeakerAllBottomSheet extends StatefulWidget {
const SpeakerAllBottomSheet({super.key});

6
lib/modules/meeting/views/speaker_bottom_sheet.dart → lib/modules/meeting/views/bottomSheet/speaker_bottom_sheet.dart

@ -6,9 +6,9 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import '../../../core/utils/synchrodata.dart';
import '../../../data/services/db/sqflite_api.dart';
import '../controllers/meeting_details_controller.dart';
import '../../../../core/utils/synchrodata.dart';
import '../../../../data/services/db/sqflite_api.dart';
import '../../controllers/meeting_details_controller.dart';
class SpeakerBottomSheet extends StatefulWidget {
final int id;

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

@ -9,12 +9,12 @@ import 'package:lottie/lottie.dart';
import '../../../core/theme/app_colors.dart';
import '../controllers/meeting_details_controller.dart';
import 'mind_map_tab.dart';
import 'more_bottom_sheet.dart';
import 'overview_tab.dart';
import 'share_bottom_sheet.dart';
import 'speech_tab.dart';
import 'summary_tab.dart';
import 'tabs/mind_map_tab.dart';
import 'bottomSheet/more_bottom_sheet.dart';
import 'tabs/overview_tab.dart';
import 'bottomSheet/share_bottom_sheet.dart';
import 'tabs/speech_tab.dart';
import 'tabs/summary_tab.dart';
class MeetingDetailsView extends GetView<MeetingDetailsController> {
const MeetingDetailsView({super.key});

1064
lib/modules/meeting/views/meeting_view.dart

File diff suppressed because it is too large

2
lib/modules/meeting/views/mind_map_tab.dart → lib/modules/meeting/views/tabs/mind_map_tab.dart

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:webview_flutter/webview_flutter.dart';
import '../controllers/mind_map_controller.dart';
import '../../controllers/mind_map_controller.dart';
class MindMapTab extends StatefulWidget {
const MindMapTab({super.key});

6
lib/modules/meeting/views/overview_tab.dart → lib/modules/meeting/views/tabs/overview_tab.dart

@ -3,9 +3,9 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../controllers/meeting_details_controller.dart';
import 'ai_bottom_sheet.dart';
import 'generate_bottom_sheet.dart';
import '../../controllers/meeting_details_controller.dart';
import '../bottomSheet/ai_bottom_sheet.dart';
import '../bottomSheet/generate_bottom_sheet.dart';
class OverviewTab extends StatefulWidget {
const OverviewTab({super.key});

10
lib/modules/meeting/views/speech_tab.dart → lib/modules/meeting/views/tabs/speech_tab.dart

@ -4,11 +4,11 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:lottie/lottie.dart';
import '../controllers/meeting_details_controller.dart';
import 'ai_bottom_sheet.dart';
import 'generate_bottom_sheet.dart';
import 'speaker_all_bottom_sheet.dart';
import 'speaker_bottom_sheet.dart';
import '../../controllers/meeting_details_controller.dart';
import '../bottomSheet/ai_bottom_sheet.dart';
import '../bottomSheet/generate_bottom_sheet.dart';
import '../bottomSheet/speaker_all_bottom_sheet.dart';
import '../bottomSheet/speaker_bottom_sheet.dart';
class SpeechTab extends GetView<MeetingDetailsController> {
const SpeechTab({super.key});

10
lib/modules/meeting/views/summary_tab.dart → lib/modules/meeting/views/tabs/summary_tab.dart

@ -4,11 +4,11 @@ import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../data/services/db/sqflite_api.dart';
import '../controllers/meeting_details_controller.dart';
import 'ai_bottom_sheet.dart';
import 'generate_bottom_sheet.dart';
import 'speaker_all_bottom_sheet.dart';
import '../../../../data/services/db/sqflite_api.dart';
import '../../controllers/meeting_details_controller.dart';
import '../bottomSheet/ai_bottom_sheet.dart';
import '../bottomSheet/generate_bottom_sheet.dart';
import '../bottomSheet/speaker_all_bottom_sheet.dart';
class SummaryTab extends StatefulWidget {
const SummaryTab({super.key});
Loading…
Cancel
Save