Browse Source

修改按钮

newdev_shunjiawei
tanlongsheng 1 year ago
parent
commit
e9b3e22add
  1. 38
      lib/modules/chat/views/chat_view.dart

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