Browse Source

Merge commit 'b7f28a6450f0caf9fd5b5583899a3a517851be89' into lxm

newdev_shunjiawei
lxm 1 year ago
parent
commit
52cfce3fbb
  1. 5
      lib/data/services/speech_impl/volcano_asr_api_service.dart
  2. 38
      lib/modules/chat/views/chat_view.dart

5
lib/data/services/speech_impl/volcano_asr_api_service.dart

@ -809,4 +809,9 @@ class VolcanoAsrApiService implements AsrService {
_isContinuousRecognitionActive = false;
_isRecognitionEndRequested = false;
}
@override
Future<void> pushAudioData(Uint8List data) {
throw UnimplementedError();
}
}

38
lib/modules/chat/views/chat_view.dart

@ -411,6 +411,15 @@ class ChatView extends GetView<ChatController> {
),
child: Row(
children: [
if (!controller.isHoldSpeak.value) 6.horizontalSpace,
if (!controller.isHoldSpeak.value)
Padding(
padding: EdgeInsets.all(6.w),
child: Icon(
Icons.camera_alt_outlined,
size: 28.w,
),
),
Expanded(
child: Obx(
() => controller.isTextInput.value
@ -448,7 +457,7 @@ class ChatView extends GetView<ChatController> {
},
child: Container(
padding: EdgeInsets.only(
left: controller.isHoldSpeak.value ? 0 : 46.w),
left: controller.isHoldSpeak.value ? 0 : 40.w),
color: Colors.transparent,
child: controller.isHoldSpeak.value
? Row(
@ -487,12 +496,12 @@ class ChatView extends GetView<ChatController> {
controller.isTextInput.value = !controller.isTextInput.value;
},
child: Container(
width: 30.w,
height: 30.w,
margin: EdgeInsets.all(8.w),
width: 28.w,
height: 28.w,
margin: EdgeInsets.all(6.w),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30.r),
borderRadius: BorderRadius.circular(28.r),
border: Border.all(
color: isDarkMode ? Colors.white : Colors.black87,
width: 2,
@ -506,6 +515,25 @@ class ChatView extends GetView<ChatController> {
),
),
),
if (!controller.isHoldSpeak.value)
Container(
width: 28.w,
height: 28.w,
margin: EdgeInsets.all(6.w),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(28.r),
border: Border.all(
color: isDarkMode ? Colors.white : Colors.black87,
width: 2,
),
),
child: Icon(
Icons.add,
size: 20.w,
),
),
if (!controller.isHoldSpeak.value) 6.horizontalSpace,
],
),
);

Loading…
Cancel
Save