|
|
|
@ -20,7 +20,8 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
return Stack( |
|
|
|
children: [ |
|
|
|
Obx( |
|
|
|
() => ListView.builder( |
|
|
|
() => controller.meetingDetails.value.tasktype != 10002 |
|
|
|
? ListView.builder( |
|
|
|
itemCount: controller.textList.length, |
|
|
|
padding: EdgeInsets.only(bottom: 80.w), |
|
|
|
itemBuilder: (BuildContext context, int index) { |
|
|
|
@ -56,9 +57,12 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
onTap: () { |
|
|
|
if (controller.isSpeakerText.value) return; |
|
|
|
Get.bottomSheet( |
|
|
|
SpeakerBottomSheet(item['id'], item['speaker']), |
|
|
|
SpeakerBottomSheet( |
|
|
|
item['id'], item['speaker']), |
|
|
|
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), |
|
|
|
@ -84,7 +88,8 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
isUtc: true, |
|
|
|
), |
|
|
|
style: TextStyle( |
|
|
|
color: MeetingUIUtils.getSecondaryTextColor(isDarkMode), |
|
|
|
color: MeetingUIUtils.getSecondaryTextColor( |
|
|
|
isDarkMode), |
|
|
|
fontSize: 13.sp, |
|
|
|
), |
|
|
|
), |
|
|
|
@ -95,12 +100,14 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
if (index == controller.textList.length - 1) { |
|
|
|
endtime = controller.durationMax.value; |
|
|
|
} else { |
|
|
|
endtime = |
|
|
|
controller.textList[index + 1]['starttime']; |
|
|
|
endtime = controller.textList[index + 1] |
|
|
|
['starttime']; |
|
|
|
} |
|
|
|
if (controller.currentDuration.value != 0) { |
|
|
|
if (controller.currentDuration.value >= starttime && |
|
|
|
controller.currentDuration.value < endtime) { |
|
|
|
if (controller.currentDuration.value >= |
|
|
|
starttime && |
|
|
|
controller.currentDuration.value < |
|
|
|
endtime) { |
|
|
|
isActive = true; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -113,13 +120,15 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
clipBehavior: Clip.hardEdge, |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: Colors.red[100], |
|
|
|
borderRadius: BorderRadius.circular(4.r), |
|
|
|
borderRadius: |
|
|
|
BorderRadius.circular(4.r), |
|
|
|
), |
|
|
|
child: Transform.scale( |
|
|
|
scale: 1.6, |
|
|
|
child: Lottie.asset( |
|
|
|
'assets/lottie/sound_effect.json', |
|
|
|
controller: controller.lottieController, |
|
|
|
controller: |
|
|
|
controller.lottieController, |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
@ -138,8 +147,8 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
horizontal: 14.w, |
|
|
|
), |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: |
|
|
|
controller.editSpeakerTextId.value == item['id'] |
|
|
|
color: controller.editSpeakerTextId.value == |
|
|
|
item['id'] |
|
|
|
? Colors.blue[100] |
|
|
|
: null, |
|
|
|
borderRadius: BorderRadius.circular(8.w), |
|
|
|
@ -147,14 +156,17 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
child: FocusScope( |
|
|
|
onFocusChange: (bool hasFocus) { |
|
|
|
if (hasFocus) { |
|
|
|
controller.editSpeakerTextId.value = item['id']; |
|
|
|
controller.editSpeakerTextId.value = |
|
|
|
item['id']; |
|
|
|
controller.editSpeakerTextChange = ''; |
|
|
|
} else { |
|
|
|
if (speakerTextController.text != |
|
|
|
item['content']) { |
|
|
|
Map? foundElement = |
|
|
|
controller.editSpeakerTextList.firstWhere( |
|
|
|
(element) => element['id'] == item['id'], |
|
|
|
Map? foundElement = controller |
|
|
|
.editSpeakerTextList |
|
|
|
.firstWhere( |
|
|
|
(element) => |
|
|
|
element['id'] == item['id'], |
|
|
|
orElse: () => null, |
|
|
|
); |
|
|
|
if (foundElement != null) { |
|
|
|
@ -163,7 +175,8 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
} else { |
|
|
|
controller.editSpeakerTextList.add({ |
|
|
|
'id': item['id'], |
|
|
|
'content': speakerTextController.text, |
|
|
|
'content': |
|
|
|
speakerTextController.text, |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -196,11 +209,14 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
if (index == controller.textList.length - 1) { |
|
|
|
endtime = controller.durationMax.value; |
|
|
|
} else { |
|
|
|
endtime = controller.textList[index + 1]['starttime']; |
|
|
|
endtime = |
|
|
|
controller.textList[index + 1]['starttime']; |
|
|
|
} |
|
|
|
if (controller.currentDuration.value != 0) { |
|
|
|
if (controller.currentDuration.value >= starttime && |
|
|
|
controller.currentDuration.value < endtime) { |
|
|
|
if (controller.currentDuration.value >= |
|
|
|
starttime && |
|
|
|
controller.currentDuration.value < |
|
|
|
endtime) { |
|
|
|
isActive = true; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -229,7 +245,10 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
item['content'], |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 15.sp, |
|
|
|
color: isActive ? Colors.red : MeetingUIUtils.getTextColor(isDarkMode), |
|
|
|
color: isActive |
|
|
|
? Colors.red |
|
|
|
: MeetingUIUtils.getTextColor( |
|
|
|
isDarkMode), |
|
|
|
letterSpacing: 0, |
|
|
|
height: 1.4, |
|
|
|
), |
|
|
|
@ -242,6 +261,17 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
], |
|
|
|
); |
|
|
|
}, |
|
|
|
) |
|
|
|
: Container( |
|
|
|
height: 200.w, |
|
|
|
alignment: Alignment.center, |
|
|
|
child: Text( |
|
|
|
'转写失败,请稍后重试', |
|
|
|
style: TextStyle( |
|
|
|
color: MeetingUIUtils.getSecondaryTextColor(isDarkMode), |
|
|
|
fontSize: 14.sp, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Obx( |
|
|
|
@ -253,7 +283,8 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
if (controller.meetingDetails.value.tasktype >= 2 && |
|
|
|
!controller.isSpeakerText.value) |
|
|
|
!controller.isSpeakerText.value && |
|
|
|
controller.meetingDetails.value.tasktype != 10002) |
|
|
|
_button( |
|
|
|
Icons.edit, |
|
|
|
'editSpeaker'.tr, // 对应中文:编辑 |
|
|
|
@ -264,7 +295,8 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
}, |
|
|
|
), |
|
|
|
if (controller.meetingDetails.value.tasktype >= 2 && |
|
|
|
!controller.isSpeakerText.value) |
|
|
|
!controller.isSpeakerText.value && |
|
|
|
controller.meetingDetails.value.tasktype != 10002) |
|
|
|
_button( |
|
|
|
Icons.supervisor_account, |
|
|
|
'nameSpeaker'.tr, // 对应中文:命名发言者 |
|
|
|
@ -272,7 +304,8 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
Get.bottomSheet( |
|
|
|
const SpeakerAllBottomSheet(), |
|
|
|
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), |
|
|
|
@ -282,7 +315,8 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
}, |
|
|
|
), |
|
|
|
if (controller.meetingDetails.value.tasktype >= 2 && |
|
|
|
!controller.isSpeakerText.value) |
|
|
|
!controller.isSpeakerText.value && |
|
|
|
controller.meetingDetails.value.tasktype != 10002) |
|
|
|
_button( |
|
|
|
Icons.auto_awesome, |
|
|
|
'Ask AI', |
|
|
|
@ -290,7 +324,8 @@ class SpeechTab extends GetView<MeetingDetailsController> { |
|
|
|
Get.bottomSheet( |
|
|
|
const AIBottomSheet(), |
|
|
|
isScrollControlled: true, |
|
|
|
backgroundColor: isDarkMode ? Colors.grey[800] : Colors.white, |
|
|
|
backgroundColor: |
|
|
|
isDarkMode ? Colors.grey[800] : Colors.white, |
|
|
|
shape: RoundedRectangleBorder( |
|
|
|
borderRadius: BorderRadius.vertical( |
|
|
|
top: Radius.circular(12.r), |
|
|
|
@ -309,7 +344,29 @@ 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), |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
}, |
|
|
|
), |
|
|
|
), |
|
|
|
if (controller.meetingDetails.value.tasktype == 10002) |
|
|
|
SizedBox( |
|
|
|
width: 150.w, |
|
|
|
child: _button( |
|
|
|
Icons.auto_awesome, |
|
|
|
'重新生成', |
|
|
|
() { |
|
|
|
Get.bottomSheet( |
|
|
|
const GenerateBottomSheet(), |
|
|
|
isScrollControlled: true, |
|
|
|
backgroundColor: |
|
|
|
isDarkMode ? Colors.grey[800] : Colors.grey[100], |
|
|
|
shape: RoundedRectangleBorder( |
|
|
|
borderRadius: BorderRadius.vertical( |
|
|
|
top: Radius.circular(12.r), |
|
|
|
|