Browse Source

修改波形图

newdev_shunjiawei
tanlongsheng 1 year ago
parent
commit
c48519c4d6
  1. 2
      lib/modules/meeting/controllers/meeting_details_controller.dart
  2. 30
      lib/modules/meeting/views/meeting_details_view.dart

2
lib/modules/meeting/controllers/meeting_details_controller.dart

@ -145,7 +145,7 @@ class MeetingDetailsController extends GetxController
}
await playerController.preparePlayer(
path: meetingData.value.filepath,
noOfSamples: 80,
noOfSamples: 88,
);
durationMax.value = await playerController.getDuration(DurationType.max);
playerController.setFinishMode(finishMode: FinishMode.pause);

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

@ -101,16 +101,24 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> {
controller.dragOffset.value = 210.w;
controller.isTop.value = false;
},
child: AudioFileWaveforms(
size: Size(130.w, 30.w),
playerController: controller.playerController,
waveformType: WaveformType.fitWidth,
enableSeekGesture: false,
playerWaveStyle: PlayerWaveStyle(
fixedWaveColor: Colors.grey[400]!,
liveWaveColor: Colors.red,
seekLineColor: Colors.red,
scaleFactor: 100,
child: SizedBox(
width: 130.w,
child: FittedBox(
fit: BoxFit.scaleDown,
child: AudioFileWaveforms(
size: Size(350.w, 30.w),
playerController: controller.playerController,
waveformType: WaveformType.fitWidth,
enableSeekGesture: false,
playerWaveStyle: PlayerWaveStyle(
spacing: 4.w,
waveThickness: 2.w,
fixedWaveColor: Colors.grey[400]!,
liveWaveColor: Colors.red,
seekLineColor: Colors.red,
scaleFactor: 200,
),
),
),
),
),
@ -344,6 +352,8 @@ class MeetingDetailsView extends GetView<MeetingDetailsController> {
playerController: controller.playerController,
waveformType: WaveformType.fitWidth,
playerWaveStyle: PlayerWaveStyle(
spacing: 4.w,
waveThickness: 2.w,
fixedWaveColor: Colors.grey[300]!,
liveWaveColor: Colors.red,
seekLineColor: Colors.red,

Loading…
Cancel
Save