Browse Source

优化交互效果

weicu
tanlongsheng 1 year ago
parent
commit
e0eb2efca7
  1. 16
      lib/modules/meeting/views/meeting_details_view.dart

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

@ -67,8 +67,9 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> {
), ),
onPressed: () => Get.back(), onPressed: () => Get.back(),
), ),
title: Opacity( title: Obx(
opacity: controller.isTop.value ? 1.0 : 0.0, () => Opacity(
opacity: (1 - (controller.dragOffset.value / 100.w)).clamp(0.0, 1.0),
child: Container( child: Container(
width: 170.w, width: 170.w,
padding: EdgeInsets.symmetric(horizontal: 2.w, vertical: 3.w), padding: EdgeInsets.symmetric(horizontal: 2.w, vertical: 3.w),
@ -134,8 +135,10 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> {
controller.dragOffset.value = 210.w; controller.dragOffset.value = 210.w;
controller.isTop.value = false; controller.isTop.value = false;
}, },
behavior: HitTestBehavior.translucent,
child: SizedBox( child: SizedBox(
width: 130.w, width: 130.w,
height: 30.w,
child: FittedBox( child: FittedBox(
fit: BoxFit.scaleDown, fit: BoxFit.scaleDown,
child: AudioFileWaveforms( child: AudioFileWaveforms(
@ -162,6 +165,7 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> {
), ),
), ),
), ),
),
centerTitle: true, centerTitle: true,
actions: [ actions: [
if (controller.isSpeakerText.value) if (controller.isSpeakerText.value)
@ -373,7 +377,9 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> {
Widget _soundWave(bool isDarkMode) { Widget _soundWave(bool isDarkMode) {
return Obx( return Obx(
() => SizedBox( () => Opacity(
opacity: (controller.dragOffset.value / 210.w).clamp(0.0, 1.0),
child: SizedBox(
height: controller.dragOffset.value < 0 height: controller.dragOffset.value < 0
? 0 ? 0
: controller.dragOffset.value > 210.w : controller.dragOffset.value > 210.w
@ -476,7 +482,8 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> {
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
if (controller.meetingData.value.filepath.isEmpty) { if (controller
.meetingData.value.filepath.isEmpty) {
controller.downloadAudio(); controller.downloadAudio();
} else { } else {
if (controller.isPlay.value) { if (controller.isPlay.value) {
@ -545,6 +552,7 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> {
], ],
), ),
), ),
),
); );
} }

Loading…
Cancel
Save