Browse Source

Merge commit 'b7f28a6450f0caf9fd5b5583899a3a517851be89' into lxm

weicu
lxm 1 year ago
parent
commit
0230da7269
  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; _isContinuousRecognitionActive = false;
_isRecognitionEndRequested = 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( child: Row(
children: [ 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( Expanded(
child: Obx( child: Obx(
() => controller.isTextInput.value () => controller.isTextInput.value
@ -448,7 +457,7 @@ class ChatView extends GetView<ChatController> {
}, },
child: Container( child: Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: controller.isHoldSpeak.value ? 0 : 46.w), left: controller.isHoldSpeak.value ? 0 : 40.w),
color: Colors.transparent, color: Colors.transparent,
child: controller.isHoldSpeak.value child: controller.isHoldSpeak.value
? Row( ? Row(
@ -487,12 +496,12 @@ class ChatView extends GetView<ChatController> {
controller.isTextInput.value = !controller.isTextInput.value; controller.isTextInput.value = !controller.isTextInput.value;
}, },
child: Container( child: Container(
width: 30.w, width: 28.w,
height: 30.w, height: 28.w,
margin: EdgeInsets.all(8.w), margin: EdgeInsets.all(6.w),
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30.r), borderRadius: BorderRadius.circular(28.r),
border: Border.all( border: Border.all(
color: isDarkMode ? Colors.white : Colors.black87, color: isDarkMode ? Colors.white : Colors.black87,
width: 2, 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