flutter_media_notification icon indicating copy to clipboard operation
flutter_media_notification copied to clipboard

Media notification not disposing

Open marianoarga opened this issue 6 years ago • 3 comments

The media dispose notification keeps alive even when hiding it on dispose, and when interacting with it after closing the app, it says "[app_name] has stopped":

@override
  void dispose() {
    hide();
    super.dispose();

  }

  Future<void> hide() async {
    try {
      await MediaNotification.hide();
      setState(() => status = 'hidden');
    } catch(e) {
      print(e);
    }
  }

marianoarga avatar Oct 11 '18 19:10 marianoarga

Plugin not supported. But you can use another plugin: https://pub.dartlang.org/packages/background_audio. It is created for background music playback. It has a "close" button on the notification

N9vn1njdf avatar Oct 22 '18 15:10 N9vn1njdf

Does it automatically disappear when you close the app?

marianoarga avatar Oct 22 '18 18:10 marianoarga

Sorry, no

N9vn1njdf avatar Oct 22 '18 19:10 N9vn1njdf