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

Loading…
Cancel
Save