mehranshoqi / voice_message_player

Play / Show voice messages in your Flutter application.
https://mehran.app
MIT License
77 stars 105 forks source link

Scroll list and Button becomes stop #38

Open SamiraAriaeifar opened 6 months ago

SamiraAriaeifar commented 6 months ago

When the list is scrolled, the interface is updated and the button user becomes stop while the sound is playing.

mehranshoqi commented 4 months ago

Could you provide more information? If you check the example, the voice message is placed in scrollable widget and it works fine.

bahaafathi commented 2 weeks ago

Just add the Controller in the initState()

 @override
  void initState() {
    _voiceController = VoiceController(
      cacheKey: widget.message.id,
      maxDuration: const Duration(seconds: 10),
      isFile: false,
      audioSrc: widget.message.content,
    );
    super.initState();
  }